Implementing a Stack in Elixir: GenServer vs. send receive

I wanted to see how I can essentially implement a GenServer in Elixir without actually using a GenSever. The following gist has two implementations, a basic GenServer implementation, and an implementation using send and receive.

it's been a while

It's been a year since I've posted anything to this blog.

I am bad and I should feel bad.

how to push and set an upstream branch in git

I like to use hub, and mainly for creating pull requests in the console. To do so you have push and set an upstream branch: git push -u origin CURRENT_BRANCH_NAME. I found myself calling the remote branch the same as my local branch which became tedious so I created a shortcut: git pu.

Basic command
git rev-parse --abbrev-ref HEAD | xargs git push -u origin
Git alias
git config --global alias.pu \
'!sh -c "git rev-parse --abbrev-ref HEAD | xargs git push -u origin"'

how to delete merged branches in git

How to delete merged branches in git

git branch --merged | grep -v \* | grep -v master | xargs git branch -d

You can also create a git alias:

git config --global alias.dm \
'!sh -c "git branch --merged | grep -v \* | grep -v master | xargs git branch -d"'

Life can be much broader once you discover one simple fact: everything around that you call life, was made up by people no smarter than you.

-- Jobs