TIL May 12020-05-01
- Nota seems a nice command line calculator. It converts what you type into ASCII art formulas.
In: 10 + 10 Out: 20.0 _____ In: ╲╱ 100 Out: 10.0 ┌ ┐ In: Max │ 10 , 1 , 21 , -3 │ └ ┘ Out: 21.0 In: ⟨Emre's Number⟩ ≡ 79 Out: 79.0 _______________ In: ╲╱ Emre's Number Out: 8.888194417315589 2 In: Emre's Number Out: 6241.0 Emre's Number In: Emre's Number Out: 8.1759873707105095e149
It looks a bit heavy for a CLI calculator, due to the fact that it's written in Haskell and downloaded 100+ MB of libraries but when you need ASCII art to show your calculations and use spaces in variables, it may prove useful.
I began to use Intention to limit my Twitter time. It allows to set a limited time (1-5-10-15 minutes) for yourself occasionally and checks the total time you spent in addictive sites. When this total time is lower than your goal for a period, you get a streak. Looks visually and psycologically nicer than LeechBlock.
I read the
git resetsection in the git book. It details how
git resetbehaves with its
--hardparameters. The first resets only the
HEAD, the second both index and
HEADand the third resets working tree and copies files back from current
HEADto the working tree.
One important point: Contrasting
git checkout masterand
git reset master: The first moves
masterbranch and the second moves current branch to
git resetcan also be used to squash commits into one. Basically you
git reset --mixedto an earlier branch like
HEAD~3and recommit. This creates a new commit, taking
HEAD~3as parent and skipping
HEAD~1with a new
Here there 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.