This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/flip.ex | |
defmodule Flip do | |
@doc """ | |
Flip the first and second parameter when calling a method. The second | |
parameter needs to be an array. The last one is the method which is | |
going to be called. | |
## Examples | |
iex> 2 |> Flip.flip([10], &Kernel.-/2) | |
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git am --3way <<< $(git --git-dir=../new-website/.git/ format-patch --stdout --root --keep-subject) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git --git-dir=../new-website/.git/ format-patch --stdout --root --keep-subject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT_ALTERNATE_OBJECT_DIRECTORIES=../new-website/.git/objects git repack -a -d -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for commit in $(git --git-dir=../new-website/.git/objects log --pretty='%H' --reverse); do | |
GIT_ALTERNATE_OBJECT_DIRECTORIES=../new-website/.git/objects git cherry-pick ${commit} | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git --git-dir=../new-website/.git/objects log --pretty='%H' --reverse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT_ALTERNATE_OBJECT_DIRECTORIES=../new-website/.git/objects git cherry-pick 471b836 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine: | |
environment: | |
PATH: "$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH" | |
services: | |
- redis | |
dependencies: | |
cache_directories: | |
- ~/.asdf | |
pre: | |
- if ! asdf | grep version; then git clone https://github.com/HashNuke/asdf.git ~/.asdf; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine: | |
services: | |
- redis | |
dependencies: | |
pre: | |
- wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb | |
- sudo apt-get update | |
- sudo apt-get install elixir | |
- yes | mix deps.get | |
- mix local.rebar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ~/.vimrc | |
vmap <Leader>ocd :ObsessiveCompulsiveDisorder<cr> | |
vmap <Leader>ro :OldToNewHash<cr> | |
vmap <Leader>t <Plug>(EasyAlign) | |
" ~/.vim/after/ftplugin/ruby.vim | |
function! s:ObsessiveCompulsiveDisorder() range | |
exec a:firstline . ',' . a:lastline . 'OldToNewHash' | |
exec a:firstline . ',' . a:lastline . 'EasyAlign :' | |
endfunction |