This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(load-file "~/.elisp/graphviz-dot-mode.el") | |
; http://users.skynet.be/ppareit/projects/graphviz-dot-mode/graphviz-dot-mode.html | |
; graphviz-dot-mode.el | |
;;;; | |
;;;; dot-compile in background | |
;;;; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# quick hack to monitor signal strength | |
# based on info from: http://www.pcurtis.com/ubuntu-mobile.htm#signal_strength | |
require 'rubygems' | |
require 'serialport' | |
require 'time' | |
class GSM | |
def initialize(options = {}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% rvm use 1.9.2@fog --create | |
Using /Users/codecafe/.rvm/gems/ruby-1.9.2-p180 with gemset fog | |
% gem install fog | |
% gem list | |
*** LOCAL GEMS *** | |
builder (3.0.0) | |
excon (0.6.0) | |
fog (0.7.1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git remote -v | |
origin git://github.com/integrity/integrity (fetch) | |
origin git://github.com/integrity/integrity (push) | |
$ git pull | |
Already up-to-date. | |
$ ruby -v | |
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03 | |
$ gem -v. | |
1.6.2 | |
$ gem list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rvm use 1.9.2@arfail | |
Using /Users/codecafe/.rvm/gems/ruby-1.9.2-p180 with gemset arfail | |
$ gem install sqlite3 activerecord | |
Fetching: sqlite3-1.3.3.gem (100%) | |
Building native extensions. This could take a while... | |
Successfully installed sqlite3-1.3.3 | |
Fetching: activesupport-3.0.5.gem (100%) | |
Fetching: builder-2.1.2.gem (100%) | |
Fetching: i18n-0.5.0.gem (100%) | |
Fetching: activemodel-3.0.5.gem (100%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
z = 3 * 0x41662d2d * 123750872726249 | |
o = [] | |
puts z.to_s(16) | |
while z != 0 | |
# let's eat through z one byte at a time | |
l = z >>4 &0xf #shift right then AND with 16 to get the character | |
r = z &0xf #just AND with 16 to get the XORed with l position in the array | |
o[r^l]=(l + 97).chr #put the character in the correct spot in the array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is run on a ubuntu 11.04 on ec2 via my user-data script | |
# https://github.com/hh/cookbooks/blob/master/chefserver-ec2-userdata.sh#L78 | |
# but the meaty broken bits are here: | |
gem install chef | |
cat <<SOLOCONFIG>/root/chef-solo.rb | |
file_cache_path "/tmp/chef-solo" | |
cookbook_path "/tmp/chef-solo/cookbooks" | |
SOLOCONFIG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "apt-get install libgconf2-ruby" on debian/ubuntu | |
require 'gconf2' | |
@gconf = GConf::Client.default | |
def ensure_plugin (my_plugin) | |
plugins = @gconf.get "/apps/compiz-1/general/screen0/options/active_plugins" | |
if not plugins.include? my_plugin | |
plugins << my_plugin | |
@gconf["/apps/compiz-1/general/screen0/options/active_plugins"]=plugins | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gconf2' | |
@gconf = GConf::Client.default | |
#these settings drive me nuts, if you want to 'switch' between them using something like shift and capskey | |
@gconf["/desktop/gnome/peripherals/keyboard/kbd/options"]=["grp\tgrp:shift_caps_toggle",] | |
# using this next line in dvorak layout, control-e sends control-d | |
@gconf["/desktop/gnome/peripherals/keyboard/kbd/layouts"]=["us","us\tdvorak",] | |
# using this next line in us layout, control-d sends control-e | |
@gconf["/desktop/gnome/peripherals/keyboard/kbd/layouts"]=["us\tdvorak","us"] | |
# which basically means any composed keys you want to use while runing a secondary layout, use the primary layout | |
# I think this is to help memory keybindings stay the same for someone who types in mulitple languages |
OlderNewer