Skip to content

Instantly share code, notes, and snippets.

View obfusk's full-sized avatar
🏳️‍🌈
hacking ⇒ ¬sleeping 😸

FC (Fay) Stegerman obfusk

🏳️‍🌈
hacking ⇒ ¬sleeping 😸
View GitHub Profile
@obfusk
obfusk / rand.sh
Created November 18, 2013 21:33
random line w/ ruby
ruby -e 'puts STDIN.lines.with_index.reduce(nil) { |x,(l,i)| rand(i+1) < 1 ? l : x }' <<< $'foo\nbar\nbaz'
@obfusk
obfusk / http_auth_bcrypt.rb
Created November 18, 2013 21:31
[OBSOLETE: NOW THAT PULL REQUEST IS MERGED, YOU CAN USE BCRYPT w/ COMFORTABLE-MEXICAN-SOFA] comfortable-mexican-sofa http auth w/ bcrypt
# Gemfile:
# gem 'bcrypt-ruby'
#
# config/initializers/comfortable_mexican_sofa.rb:
# config.admin_auth = 'ComfortableMexicanSofa::HttpAuthBCrypt'
# ComfortableMexicanSofa::HttpAuthBCrypt.username = 'myname'
# ComfortableMexicanSofa::HttpAuthBCrypt.password = BCrypt::Password.new '...hash...'
require 'bcrypt'
@obfusk
obfusk / .bash_profile
Created November 15, 2013 21:26 — forked from noxqsgit/.bash_profile
~nap dotfiles
# NAP {
umask 0022
export PATH="/__nap/nap/bin:$PATH" NAPRC=/__nap/cfg/naprc
# } NAP
# FELIX {
for _path in \
@obfusk
obfusk / README.md
Last active December 28, 2015 08:49 — forked from noxqsgit/README.md
different Gemfile.lock files for different branches

Use different Gemfile.lock files for different branches:

  • Symlink Gemfile.branch1 and Gemfile.branch2 to Gemfile.all.
  • Use the branch-bundle script instead of bundle.
@obfusk
obfusk / README.md
Created November 9, 2013 00:52 — forked from noxqsgit/README.md
nap switch branch

nap (remote)

nap stop APP

apps/APP (local)

git checkout stable
git push REMOTE stable
git branch -d master
@obfusk
obfusk / sync-home
Last active December 26, 2015 02:09 — forked from noxqsgit/sync-home
sync
#!/bin/bash
host="$HOSTNAME"
exclude_list=(
/.bundle /.cabal /.gem /.node /.npm /.vagrant.d /Downloads /VMs
/opt/{pkg,src}
)
for x in "$HOME"/tmp/build/chromium*; do
@obfusk
obfusk / git.md
Last active December 26, 2015 02:09 — forked from noxqsgit/git.md
git basics

Learn to use git

--> http://try.github.com

Use git for your project

$ cd /path/to/your/project
$ git init .

Add a github or bitbucket remote (?!)

@obfusk
obfusk / apg.sh
Created October 20, 2013 19:42 — forked from noxqsgit/apg.sh
apg
apg -a 1 -n 1 -m 20 -x 20 -M SNCL -s # no S -> no symbols
@obfusk
obfusk / socat.sh
Created October 20, 2013 19:42 — forked from noxqsgit/socat.sh
socat -- still testing
socat -d -d -d TCP4-LISTEN:9999,fork,bind=localhost TCP4:192.168.1.222:27017
@obfusk
obfusk / packages
Created October 20, 2013 19:40 — forked from noxqsgit/packages
iridium
build-essential
byobu
curl
dia
git
gitg
grc
gstreamer0.10-ffmpeg
gstreamer0.10-fluendo-mp3
haskell-platform