Posted on :: Tags: , , , , , , , ,
  • Nota seems like a nice command-line calculator. It converts what you type into ASCII art formulas.
  In[1]: 10 + 10

 Out[1]: 20.0


           _____
  In[2]: ╲╱ 100

 Out[2]: 10.0


             ┌                  ┐
  In[3]: Max │ 10 , 1 , 21 , -3 │
             └                  ┘

 Out[3]: 21.0


  In[4]: ⟨Emre's Number⟩ ≡  79

 Out[4]: 79.0


           _______________
  In[5]: ╲╱ Emre's Number

 Out[5]: 8.888194417315589


                      2
  In[6]: Emre's Number

 Out[6]: 6241.0


                      Emre's Number
  In[7]: Emre's Number

 Out[7]: 8.1759873707105095e149

It looks a bit heavy for a CLI calculator, as it is written in Haskell and downloads 100+ MB of libraries, but when you need ASCII art to display your calculations or want to use spaces in variable names, it may prove useful.
  • I began to use Intention to limit my Twitter time. It allows you to set a limited time (1, 5, 10, or 15 minutes) for yourself and tracks the total time you spend on addictive sites. When this total time is lower than your goal for a period, you get a streak. It looks visually and psychologically nicer than LeechBlock.

  • I read the git reset section in the Git book. It details how git reset behaves with its --soft, --mixed, and --hard parameters. The first resets only the HEAD; the second resets both the index and HEAD; and the third resets the working tree and copies files back from the current HEAD to the working tree.

    One important point: Contrasting git checkout master and git reset master: the first moves HEAD to the master branch, while the second moves the current branch to master.

    git reset can also be used to squash commits. Basically, you git reset --mixed to an earlier commit like HEAD~3 and recommit. This creates a new commit, taking HEAD~3 as the parent and skipping HEAD~2 and HEAD~1, resulting in a new HEAD.

  • Here are many useful pure Bash functions to be used in scripts. I’m a Zsh person, but writing Bash scripts is more portable, of course.