Skip to content

Instantly share code, notes, and snippets.

lstor /
Last active Jan 12, 2018
Colorful motd with hostname and last logins
# Make sure to install 'figlet' and 'lolcat' and
# update their path in the script as necessary
if [ -z "$TMUX" ]; then
echo -e "\nWelcome to..."
/usr/bin/figlet -f slant " `/bin/hostname -s`"
echo "List of last logins: "
/usr/bin/last | head -n 5
} | /usr/games/lolcat
lstor /
Last active Apr 3, 2016
Install dotfiles
echo "Installing dotfiles..."
# Clone repo
git clone --bare --separate-git-dir=$HOME/.dotfiles $HOME/dotfiles-unused
# Move submodules, if any
if [ -x ~/dotfiles-tmp/.gitmodules ]; do
cp -v ~/dotfiles-tmp/.gitmodules ~

Keybase proof

I hereby claim:

  • I am lstor on github.
  • I am lstor ( on keybase.
  • I have a public key whose fingerprint is 16EE AB66 8F0B 7D35 3ED0 5F10 9A79 7B22 29EB 2FB1

To claim this, I am signing this object:

lstor / Crypto.exs
Created Apr 15, 2015
Compute MD5 hash
View Crypto.exs
defmodule Crypto do
def md5(data) do
|> :erlang.bitstring_to_list
|>"~2.16.0b", [&1])))
|> List.flatten
|> :erlang.list_to_bitstring
View gist:81b9e3183bdec21743dc
<?xml version="1.0"?>
<console change_refresh="10" refresh="100" rows="25" columns="80" buffer_rows="500" buffer_columns="0" shell="C:\Program Files (x86)\Git\bin\sh.exe --login -i" init_dir="C:\src" start_hidden="0" save_size="0" background_text_opacity="255">
<colors background_text_opacity="255">
<color id="0" r="0" g="0" b="0"/>
<color id="1" r="0" g="0" b="128"/>
<color id="2" r="0" g="150" b="0"/>
<color id="3" r="0" g="150" b="150"/>
<color id="4" r="170" g="25" b="25"/>
<color id="5" r="128" g="0" b="128"/>
View In a diff, search for added lines containing 'bacon', and highlight only 'bacon'
; Explanation:
; / <- start search
; ^+ <- has a + at the beginning of the line
; [^+] <- does not have another + after that (avoid +++-lines)
; .* <- match anything up until...
; \zs <- start highlighted area (match)
; bacon <- what we're actually looking for