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
Things to remember to do before bundling an AMI | |
=============================================== | |
rm -rf /etc/ssh/ssh_host_* | |
export EC2_AMITOOL_HOME=/usr/local/ec2 | |
modprobe loop | |
rm -rf /mnt/arch* | |
rm -rf ~/.bash_history | |
/usr/local/ec2/bin/ec2-bundle-vol --generate-fstab --no-inherit -d /mnt -p arch -r i386 -u <your userid> -k /mnt/pk-<yourkey>.pem -c /mnt/cert-<yourcert>.pem | |
/usr/local/ec2/bin/ec2-upload-bundle -m /mnt/arch.manifest.xml -b <bucket name> -a <your access> -s <your secret key> |
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
class String | |
alias_method :__scan__, :scan | |
def scan *args | |
res = __scan__ *args | |
if res.first.is_a? Array and res.first.size == 1 | |
res.map! {|a| a.first } | |
end | |
res | |
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
-- git mv ./fobash: $1: unbound variable | |
obar/som-bash: $1: unbound variable | |
ething |
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
sudo ./configure --enable-largefiles --enable-menu --enable-color-console \ | |
--enable-apple-remote --enable-macosx-finder-support --enable-macosx-bundle \ | |
--enable-libavutil_a --enable-libavcodec_a --enable-libavformat_a \ | |
--enable-libavutil_so --enable-libavcodec_so --enable-libavformat_so \ | |
--enable-theora |
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
Checked out revision 27655. | |
[Mon Sep 22 - 01:25:35] [elliottcable @ Geoffrey] [/usr/local/src/] | |
-- sudo cp mplayer/ mp | |
mp2bug mpic++ mpicc mpicxx mpiexec mpif77 mpif90 mpirun mplayer/ | |
[Mon Sep 22 - 01:25:35] [elliottcable @ Geoffrey] [/usr/local/src/] | |
-- sudo cp mplayer/ mplayer/ | |
Display all 117 possibilities? (y or n) | |
[Mon Sep 22 - 01:25:35] [elliottcable @ Geoffrey] [/usr/local/src/] | |
-- sudo cp mplayer/ mplayer~ | |
cp: mplayer/ is a directory (not copied). |
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
Dear campus community: | |
As the daylight hours begin to decrease and both the human and moose traffic on campus | |
picks up, the Campus Response Team (CRT) would like to remind you to be aware of your | |
surroundings as you travel around on campus. | |
... | |
Have a safe and productive fall semester! | |
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
def x(*a); end; method(:x).arity | |
# => -1 | |
lambda {}.arity | |
# => -1 | |
def x; end; method(:x).arity | |
# => 0 | |
lambda {|| }.arity | |
# => 0 | |
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
# Need the space so we don't see Module#attr_*#attr_reader | |
describe ' #attr_reader', :shared => true do | |
it 'should create a reader method from a single symbol' do | |
@class.instance_eval do | |
attr_reader :foo | |
end | |
@class.new.should respond_to :foo | |
end | |
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
attr_accessor :foo | |
def foo | |
@foo ||= :default | |
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
class Foo | |
def self.inherited klass | |
klass.send :class_variable_set, :@@attribute_initializations, [] | |
klass.send :define_method, :bar do | |
self.class.send :class_variable_get, :@@attribute_initializations | |
end | |
end | |
end | |
class A < Foo |