Skip to content

Instantly share code, notes, and snippets.

View kaosf's full-sized avatar
🏠
Working from home

ka kaosf

🏠
Working from home
View GitHub Profile
/some/where/.hsenv/ghc_pkg_db
/some/where/.hsenv/ghc/lib/ghc-7.8.2/package.conf.d
Cabal-1.18.1.3
Cabal-1.20.0.0
HTTP-4000.2.14
ansi-terminal-0.6.1.1
ansi-wl-pprint-0.6.7.1
array-0.5.0.0
attoparsec-0.11.3.0
base-4.7.0.0
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: haskell-platform-2013.2.0.0 (user goal)
next goal: unix (dependency of haskell-platform-2013.2.0.0)
rejecting: unix-2.7.0.1/installed-23f..., 2.7.0.1, 2.7.0.0 (conflict:
haskell-platform => unix==2.6.0.1)
trying: unix-2.6.0.1
next goal: base (dependency of unix-2.6.0.1)
rejecting: base-4.7.0.0/installed-018... (conflict: unix => base>=4.2 && <4.7)
rejecting: base-4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0,
sudo apt-get install haskell-platform
mkdir -p some/where/as/you/like
cd some/where/as/you/like
cabal install cabal-install
export PATH=$HOME/.cabal/bin:$PATH
cabal sandbox init
git clone git@github.com:pasberth/paradocs.git
cabal install ./paradocs
./.cabal-sandbox/bin/paradocs ./paradocs/doc/cheatsheet.pdoc > cheatsheet.html
require 'optparse'
user = nil
host = nil
path = nil
OptionParser.new do |opt|
opt.on('-u username', '--user') { |x| user = x }
opt.on('-h hostname', '--host') { |x| host = x }
opt.on('--path path') { |x| path = x }
end.parse!
rbenv install 2.1.2
rbenv global 2.1.2
rbenv rehash
gem install earthquake -v 1.0.1 --no-ri --no-rdoc
rbenv rehash
git clone git@github.com:kaosf/earthquake.git
cd earthquake
git diff d43e0acd638c635a27af6088a572bee77b643808..c3271d7ef4ec660e6cf0ec7ca5d3d8a10e65b6e0 --no-prefix > patchfile
patch -p0 -d $HOME/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/earthquake-1.0.1 < patchfile
NeoBundle 'kaosf/ka-vim-snippets'
let g:neosnippet#snippets_directory="~/.vim/bundle/ka-vim-snippets"
addtogitignore () {
if [ $# -lt 1 ]
then
return 1
fi
local PARAMS=$(echo $@ | sed 's/ /,/g')
curl www.gitignore.io/api/$PARAMS >> .gitignore 2> /dev/null
echo "Executed \"curl www.gitignore.io/api/$PARAMS >> .gitignore\""
}
describe do
let(:x) { 1 }
describe do
let(:x) { x }
it { expect(x).to eq(1) }
end
end
# Run "rspec foo_spec.rb"
if [ ! -f $HOME/local/bin/diff-highlight ]
then
wget https://raw.githubusercontent.com/git/git/34d9819e0a387be6d49cffe67458036450d6d0d5/contrib/diff-highlight/diff-highlight
wget https://gist.githubusercontent.com/a2ikm/2dbfb89114dfa5c543ed/raw/e2d8d550ef601c9310712f4187b803658427dd42/diff-highlight.utf8.patch
patch -u diff-highlight < diff-highlight.utf8.patch
chmod +x diff-highlight
rm diff-hilight.orig diff-hilight.utf8.patch
mkdir -p $HOME/local/bin
mv diff-highlight $HOME/local/bin
fi
Earthquake.init do
command :openfirefox do |m|
matches = twitter.status(m[1])['retweeted_status'].nil? ?
URI.extract(twitter.status(m[1])["text"],["http", "https"]) :
URI.extract(twitter.status(m[1])['retweeted_status']["text"],["http", "https"])
unless matches.empty?
matches.each do |match_url|
`firefox #{match_url}`
end
else