Skip to content

Instantly share code, notes, and snippets.

View mitchty's full-sized avatar

Mitch Tishmack mitchty

  • Saint Paul, MN
View GitHub Profile
Testing rbx
Using /local/home/jenkins/.rvm/gems/rbx-head
/local/home/jenkins/.rvm/gems/rbx-head@jenkins-batongem-166 already does not exist.
'jenkins-batongem-166' gemset created (/local/home/jenkins/.rvm/gems/rbx-head@jenkins-batongem-166).
ERROR: Loading command: install (NameError)
Missing or uninitialized constant: Encoding::UTF_7
ERROR: While executing gem ... (NameError)
Missing or uninitialized constant: Gem::Commands::InstallCommand
An exception occurred running /local/home/jenkins/.rvm/gems/rbx-head/bin/bundle
Missing or uninitialized constant: Encoding::UTF_7 (NameError)
rubinius-2.0.0dev :001 > `env RBXOPT=-X19 rbx -v`
=> "rubinius 2.0.0dev (1.9.3 b3d2952f yyyy-mm-dd JI) [x86_64-apple-darwin11.2.0]\n"
rubinius-2.0.0dev :002 >
@mitchty
mitchty / gist:1623243
Created January 16, 2012 21:58
rbx oopsie
** Execute spec18
bin/mspec ci -T -X18 -d --background --agent
rubinius 2.0.0dev (1.8.7 48fa2dd4 yyyy-mm-dd JI) [x86_64-apple-darwin11.2.0]
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.........................................................................................................................................................................................................................................................................................................................................................................................
$ mkdir $HOME/foo
me@imac
$ ls -dal !$
ls -dal $HOME/foo
drwxr-xr-x 2 mitch staff 68 Jan 16 19:24 /Users/mitch/foo
me@imac
$ mkdir /tmp/foo
me@imac
$ ls -dal /tmp/foo
drwxr-xr-x 2 mitch wheel 68 Jan 16 19:24 /tmp/foo
2: CC vm/capi/globals.cpp
2: CC vm/capi/handle.cpp
3: CC vm/capi/hash.cpp
2: CC vm/capi/io.cpp
3: CC vm/capi/kernel.cpp
3: CC vm/capi/marshal.cpp
2: CC vm/capi/module.cpp
vm/capi/module.cpp: In function ‘int rb_const_defined_at(intptr_t, intptr_t)’:
vm/capi/module.cpp:33:30: error: unused variable ‘env’ [-Werror=unused-variable]
cc1plus: all warnings being treated as errors
@mitchty
mitchty / gist:2551742
Created April 29, 2012 16:35
interesting regex behavior on rbx
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
$ pry
main> 'FooBar'.split(/(?=[A-Z])/).map{|_| _.downcase}.join('_')
=> "foo_bar"
main> 'FooBar'.split(/(?=[A-Z])/)
=> ["Foo", "Bar"]
$ ruby -v
rubinius 2.0.0dev (1.9.3 e817532e yyyy-mm-dd JI) [x86_64-apple-darwin11.3.0]
@mitchty
mitchty / whatever.sh
Created May 3, 2012 01:35
My "solution" to not using rbenv/rvm
function ls_path {
for x in $(echo $PATH | sed -e 's/\:/ /g'); do
[[ -d "$x" ]] && echo $x
done
}
# Could probably do this all in one awk, but I was lazy.
# note the awk function strips out duplicate entries based on first
# appearance. Which is exactly what the shell does too so meh.
# Not going to "optimize" this as it runs all of maybe 10 times a day.
@mitchty
mitchty / god_irc.rb
Created November 16, 2012 20:18
dumb god config for my irc stuff
# First startup znc prior to the alice daemon
God.watch do |w|
w.name = 'znc-daemon'
w.interval = 30.seconds # default
w.start = 'znc'
w.stop = 'pkill znc'
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.pid_file = ENV['HOME'] + '/.znc/znc.pid'
w.log = ENV['HOME'] + '/god/log/znc.log'
@mitchty
mitchty / freebsd9-zfs-install.sh
Created November 17, 2012 15:54
A contrived freebsd install script
#!/bin/sh
zpool destroy zroot
for disk in 0 1 2 3 4 5; do
gpart destroy -F ada${disk}
gpart create -s gpt ada${disk}
gpart add -b 34 -s 94 -t freebsd-boot ada${disk}
gpart add -b 2048 -t freebsd-zfs -l disk${disk} ada${disk}
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada${disk}
gnop create -S 4096 /dev/gpt/disk${disk}
$ git clone https://github.com/jruby/jruby
Cloning into 'jruby-git'...
remote: Counting objects: 207821, done.
remote: Compressing objects: 100% (51079/51079), done.
remote: Total 207821 (delta 143980), reused 205952 (delta 142282)
Receiving objects: 100% (207821/207821), 112.78 MiB | 692 KiB/s, done.
Resolving deltas: 100% (143980/143980), done.
error: git-remote-https died of signal 13