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
sealed trait Addable[T] { | |
def add(a: T, b: T): T | |
} | |
object AddableInstances { | |
implicit val intAddable = new Addable[Int] { | |
override def add(a: Int, b: Int): Int = a + b | |
} | |
} |
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
# This is to be used in environments without proper yum usage. | |
# Mosh | |
sudo yum -y install autoconf automake gcc gcc-c++ make boost-devel | |
sudo yum -y install zlib-devel ncurses-devel protobuf-devel openssl-devel | |
wget https://mosh.org/mosh-1.3.0.tar.gz | |
tar xf mosh-1.3.0.tar.gz -C /tmp/ | |
cd /tmp/mosh-1.3.0 | |
./configure | |
make -j7 |
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
sudo find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n |
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
tnoremap <Esc> <C-\><C-n> | |
tnoremap jj <C-\><C-n> | |
au TermOpen * set number |
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
#!/usr/bin/env bash | |
sudo yum groups install -y Development\ tools | |
sudo yum install -y cmake | |
sudo yum install -y python34-{devel,pip} | |
sudo pip-3.4 install neovim --upgrade | |
( | |
cd "$(mktemp -d)" | |
git clone https://github.com/neovim/neovim.git | |
cd neovim | |
make CMAKE_BUILD_TYPE=Release |
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
# Mac specific stuff | |
alias rmDerivedData="rm -rf ~/Library/Developer/Xcode/DerivedData" | |
alias cdDerivedData="cd ~/Library/Developer/Xcode/DerivedData" | |
# FZF specific stuff | |
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
export FZF_DEFAULT_OPTS='--height 40% --reverse --border' | |
alias tb="nc termbin.com 9999" | |
# Git specific stuff |
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
#!/bin/sh | |
ln -s ~/.vim ~/.config/nvim | |
ln -s ~/.vimrc ~/.config/nvim/init.vim |
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
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
#!/bin/sh | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: remcharafter character" | |
exit 1 | |
fi | |
cut -f1 -d"$1" |
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
#!/bin/sh | |
wget -q -O - \ | |
-U "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8" \ | |
--header="Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1" \ | |
--header="Accept-Language: en" \ | |
--header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" \ | |
--referer="http://tinyurl.com/" \ | |
--header="Content-Type: application/x-www-form-urlencoded" \ | |
--post-data="url=$*" \ | |
http://tinyurl.com/create.php \ |