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 / .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 / 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 / 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 / json.sh
Created November 19, 2013 22:44
prettyfy json w/ ruby oneliner
ruby -rjson -e 'puts JSON.pretty_generate(JSON.load(STDIN))' <<< '{ "foo": 99, "bar": "baz" }'
@obfusk
obfusk / README.md
Last active February 23, 2018 11:10
EventSource and phantomjs/poltergeist/capybara-webkit

I've been using capybara to test a small web app that uses EventSource. I ran into some issues with headless testing.

First attempt

visit 'http://localhost:9292'
  • selenium/firefox works just fine
@obfusk
obfusk / load-modeline.vim
Created December 7, 2013 23:06
vim: load modeline of current file (when disabled by default)
set modelines=1 | e | set modelines=0
@obfusk
obfusk / README.md
Last active January 1, 2016 10:49
fix for blank screen during boot with intel graphics

I installed Debian (wheezy) on my MacBook (2008) w/o X (yet). During boot, the screen would go blank. I tried nomodeset and many other things, but finally this one worked:

video=i915
@obfusk
obfusk / README.md
Last active January 1, 2016 19:29
create an encrypted flash drive on the command line w/ cryptsetup

1. Prepare

$ modprobe dm-crypt
$ modprobe sha512
$ modprobe aes

2. Partition

@obfusk
obfusk / README.md
Last active January 2, 2016 05:19
sodium'

Install

  • bios: boot, no bt, no cam?, passwd
  • debian wheezy: exp, e+w, min, contrib

Packages (1)

  • ~prequired
  • ~pimportant
  • ~pstandard (w/o exim4-*, rpcbind, xauth)
@obfusk
obfusk / sources.list
Created January 4, 2014 19:15
apt sources.list for debian unstable
deb http://ftp.nl.debian.org/debian/ testing main contrib
deb-src http://ftp.nl.debian.org/debian/ testing main contrib
deb http://security.debian.org/ testing/updates main contrib
deb-src http://security.debian.org/ testing/updates main contrib
deb http://ftp.nl.debian.org/debian/ testing-updates main contrib
deb-src http://ftp.nl.debian.org/debian/ testing-updates main contrib