TIL May 1
- Nota seems 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, 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 reset
section in the git book. It details howgit reset
behaves with its--soft
,--mixed
and--hard
parameters. The first resets only theHEAD
, the second both index andHEAD
and the third resets working tree and copies files back from currentHEAD
to the working tree.One important point: Contrasting
git checkout master
andgit reset master
: The first movesHEAD
tomaster
branch and the second moves current branch tomaster
.git reset
can also be used to squash commits into one. Basically yougit reset --mixed
to an earlier branch likeHEAD~3
and recommit. This creates a new commit, takingHEAD~3
as parent and skippingHEAD~2
,HEAD~1
with a newHEAD
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.