Skip to content

Instantly share code, notes, and snippets.

@mkocher
mkocher / gist:969445
Created May 12, 2011 21:05
Requring psych before yaml, ruby-1.9.2-p180 on centos
ruby-1.9.2-p180 :006 > exit
[clients-user@ip-10-83-118-38 workspace]$ cd ..
[clients-user@ip-10-83-118-38 workspace]$ vi config
config/ config.ru
[clients-user@ip-10-83-118-38 workspace]$ vi config/
application.rb cucumber.yml database.yml.example environments/ locales/
boot.rb database.yml environment.rb initializers/ routes.rb
[clients-user@ip-10-83-118-38 workspace]$ vi config/database.yml.example
[clients-user@ip-10-83-118-38 workspace]$ irb
ruby-1.9.2-p180 :001 > require 'pp'
@mkocher
mkocher / $PATH
Created March 22, 2011 18:56
Our rvm_install_on_use_flag seems to be producing broken rubies - we couldn't decide what it would make sense to trace - the install itself?
user@server:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/company/com/bin/java6_32/bin:/company/com/bin/ant/bin:/company/com/bin/RDSCli/bin:/company/com/bin/CloudWatch/bin:/company/com/bin/ec2-api-tools/bin:/home/user/.rvm/bin
require 'spec_helper'
class ::ParentDoc
include MongoMapper::Document
many :embedded_docs
many :child_docs
key :name, String
end
class ::EmbeddedDoc
#!/usr/bin/ruby
if `networksetup -getairportpower AirPort` =~ /On/
exec "networksetup -setairportpower AirPort off"
else
exec "networksetup -setairportpower AirPort on"
end
raise "Code here isn't very usefull"
#####
# Found on http://www.documentsnap.com/abbyy-finereader-and-snow-leopard-file-not-created-with-scansnap/
# and modified to work from command line and behave slightly differently. Creating an Automator script
# to trigger should be trivial, though. you'd want to add a "cd /path/to/incoming_scans" at the top.
#
# Works with ScanSnap on Snow Leopard with the latest Abby Fine Reader and ScanSnap drivers. Doesn't
# do the meta data munging though that should be trivial to add back in.
#
# Do you scanning all at once, then kick this script off when you leave your computer - this results in a
# great speed up in workflow