Skip to content

Instantly share code, notes, and snippets.

View jbfink's full-sized avatar
💭
we have statuses now? is this AOL?

John Fink jbfink

💭
we have statuses now? is this AOL?
View GitHub Profile
@jbfink
jbfink / modrails stuff again
Created July 18, 2012 20:13
modrails stuff
#for modrails
#LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
# PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.15
# PassengerRuby /usr/bin/ruby1.8
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.11
PassengerRuby /usr/bin/ruby1.8
@jbfink
jbfink / gist:3824267
Created October 3, 2012 00:52
unable to access array. need reader?
class Argh
array = %w[bob ted alice frank]
def get
array.sample
end
end
@jbfink
jbfink / gist:3861224
Created October 9, 2012 20:31
openstack notes
Provisioning Nova instances work when volumes are less than 1GB, but we still can't attach volumes to instances.
So m1.tiny works but not any other m1. (they provision larger drives).
we are interested in object store, NOT volumes (for s3-alike).
get your key / enviro variable setup in "Settings" for your account, openrc.sh is your friend
todo:
wtf is bucket v. container? If s3 uses buckets, how to to link to container?
#!/bin/sh
# This script converts any kind of video the HandBrake CLI can handle
# into a 1000 kbit MPEG4 video and shrinks it down to a max width of 640 px.
#
# Usage:
# Running the script without any parameters just uses *all* files in the
# current directory and converts them, so make sure you only have video files
# in the directory you're in.
#
@jbfink
jbfink / gist:4755655
Created February 11, 2013 16:48
sorting an argv array
#note that - reverse sorts 'cos negative numbers are opposite of positive
#neat, that, huh?
array = ARGV.sort_by {|x| -x.length}
puts array
#database creds
set :db_database, "wordpress"
set :db_username, "wordpress"
set :db_password, "password"
#
set :application, "wordpress"
set :repository, "capprod:/usr/local/gits/wordpress"
set :scm, :git
set :deploy_to, "/var/www/wordpress"
set :use_sudo, false
@jbfink
jbfink / ARRRRR
Created April 15, 2013 16:00
eth0 /etc/networking for smuggler
auto eth0
iface eth0 inet static
address 130.113.111.90
netmask 255.255.255.0
network 130.113.163.0
broadcast 130.113.111.255
gateway 130.113.111.5
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 130.113.128.1
dns-search mcmaster.ca
@jbfink
jbfink / gist:5576819
Created May 14, 2013 15:27
installing node on ubuntu
sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
HI MISTY
output of docker inspect below, I want to pull out, say, .Config.Dns and have it just be 8.8.8.8. Here's what I get:
$ docker inspect ddef586908d4 | jq '.Config.Dns'
[
"8.8.8.8"
]
@jbfink
jbfink / gist:5645141
Created May 24, 2013 17:32
mustache irritation
fuh.json:
{
"Id": "ASDFKASDFJASDFKASDF"
}
fuh.template:
Why isn't {{Id}} showing up????