Skip to content

Instantly share code, notes, and snippets.

View dysinger's full-sized avatar
😅
16 hour days is OK. Right?

Dysinger dysinger

😅
16 hour days is OK. Right?
  • Independent
  • Nearby
View GitHub Profile
@dysinger
dysinger / lulznpm.log
Created March 1, 2014 03:55
lulz npm
khartes ➤ npm install aws-sdk
npm http GET https://registry.npmjs.org/aws-sdk
npm http GET https://registry.npmjs.org/aws-sdk
npm http GET https://registry.npmjs.org/aws-sdk
npm http 304 https://registry.npmjs.org/aws-sdk
npm http GET https://registry.npmjs.org/xml2js/0.2.4
npm http GET https://registry.npmjs.org/xmlbuilder/0.4.2
npm http 304 https://registry.npmjs.org/xmlbuilder/0.4.2
npm http GET https://registry.npmjs.org/xml2js/0.2.4
npm http GET https://registry.npmjs.org/xml2js/0.2.4
@dysinger
dysinger / boto-with-gnu-parallel.md
Last active August 29, 2015 13:56
Boto w/ GNU-Parallel for Reports & Actions

Using Boto & GNU-Parallel Together

For mass destruction (j/k I mean powerful data gathering)

Useful Prelude of Functions

(when window-system
(setq exec-path (shell-command ". ~/.bashrc ; echo $PATH")))
@dysinger
dysinger / docker-ruby-fpm.sh
Last active August 29, 2015 13:56
Stop using rbenv & rvm on servers. plz. kthnx.
cat > Dockerfile <<\EOF
FROM ubuntu:12.04
RUN apt-get update
RUN apt-get install -y ruby1.9.3 build-essential \
libc6-dev libffi-dev libgdbm-dev libncurses5-dev \
libreadline-dev libssl-dev libyaml-dev zlib1g-dev
RUN gem install fpm --bindir=/usr/bin --no-rdoc --no-ri
RUN apt-get install -y curl
RUN curl ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz|tar oxzC /tmp
WORKDIR /tmp/ruby-1.9.3-p484
class Falsey a where
false :: a -> Bool
instance Falsey Char where
false _ = False
instance Falsey a => Falsey [a] where
false [] = True
false (x:[]) = false x
false (x:xs) | false x = True
@dysinger
dysinger / idris
Last active August 29, 2015 13:56
HELP I'M NEW TO HASKELL AND CABAL IS KILLING ME!!!
# REMOVE ANYTHING CABAL HAS EVER DROPPED ONTO YOUR SYSTEM
rm -rf ~/.{ghc,cabal}
# UPDATE CABAL
cabal update
# UPGRADE CABAL TO 1.18 (BECAUSE THEY ADDED SANDBOXES)
cabal install cabal-install
export PATH=~/.cabal/bin:$PATH ;# PUT THIS IN YOUR PROFILE
@dysinger
dysinger / gist:8760823
Created February 1, 2014 23:40
Idris -> Java Hello World in 6 lines
$ cabal sandbox init
$ cabal install idris
$ echo 'main : IO () ; main = print "hello"' >hello.idr
$ ./.cabal-sandbox/bin/idris --mvn --codegen Java -o hello hello.idr
$ cd hello
$ mvn -DmainClass=hello package shade:shade
$ java -jar target/hello.jar
"hello"
@dysinger
dysinger / gist:7899398
Created December 10, 2013 20:55
/etc/apt/sources.list
cat >/etc/apt/sources.list <<\EOF
deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse
EOF
@dysinger
dysinger / xmonad.hs
Created December 9, 2013 13:54
Super basic XMonad / Gnome config file
import XMonad
import XMonad.Config.Gnome
import XMonad.Util.Replace
main :: IO ()
main = replace >> xmonad gnomeConfig { modMask = mod4Mask }
tim@humuhumunukunukuapuaa:~/src/a17/devops% cat /home/tim/.vagrant.d/gems/gems/nio4r-0.5.0/ext/nio4r/mkmf.log
"gcc -o conftest -I/opt/vagrant/embedded/include/ruby-1.9.1/i686-linux -I/opt/vagrant/embedded/include/ruby-1.9.1/ruby/backward -I/opt/vagrant/embedded/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -I/tmp/vagrant-temp/embedded/include -I/tmp/vagrant-temp/embedded/include -L/tmp/vagrant-temp/embedded/lib -fPIC conftest.c -L. -L/opt/vagrant/embedded/lib -Wl,-R/opt/vagrant/embedded/lib -L/tmp/vagrant-temp/embedded/lib -Wl,-R/tmp/vagrant-temp/embedded/lib -L. -I/tmp/vagrant-temp/embedded/include -L/tmp/vagrant-temp/embedded/lib -rdynamic -Wl,-export-dynamic -L/tmp/vagrant-temp/embedded/lib -Wl,-R/tmp/vagrant-temp/embedded/lib '-Wl,-rpath,/../lib' -Wl,-R -Wl,/opt/vagrant/embedded/lib -L/opt/vagrant/embedded/lib -lruby -lpthread -lrt -ldl -lcrypt -lm -lc"
In file included from /opt/vagrant/embedded/include/ruby-1.9.1/ruby.h:32:0,
from conftest.c:1:
/opt/vagrant/embedded/include