Skip to content

Instantly share code, notes, and snippets.

View krisf's full-sized avatar

krisf krisf

  • The Internet
View GitHub Profile
@krisf
krisf / gist:1319972
Created October 27, 2011 15:57
registry fun in ruby
def create_registry_keys(data)
require 'win32/registry'
data.each do |key, value|
path = key.split("\\").delete_at(-1).delete_at(0).join("\\")
root = key.split("\\").first
key = key.split("\\").last
if root == "HKEY_CURRENT_USER"
hive = Win32::Registry::HKEY_CURRENT_USER.new
else
hive = Win32::Registry::HKEY_LOCAL_MACHINE.new
@krisf
krisf / setup.sh
Created July 23, 2011 18:25 — forked from huobazi/setup.sh
Ubuntu setup for Ruby, Nginx, Postgres 9, Rails
#!/bin/bash
# install dependencies
apt-get update && apt-get upgrade
apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
# install RVM
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
### as per RVM instructions (both files)