This file contains 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 foo; bar = "blah"; raise NotImplementedError; end | |
=> #<CompiledMethod foo file=(irb)> | |
>> def get_exception; begin; yield; nil; rescue Exception => e; e; end; end | |
=> #<CompiledMethod get_exception file=(irb)> | |
>> e = get_exception { foo } | |
=> #<NotImplementedError: NotImplementedError> | |
>> cx = e.context | |
=> #<MethodContext:0x16a main#foo (irb):1> | |
>> m = cx.method | |
=> #<CompiledMethod foo file=(irb)> |
This file contains 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
Ubuntu 8.10, 2.6.27-10-generic #1 SMP Fri Nov 21 12:00:22 UTC 2008 i686 GNU/Linux | |
rubinius (git: master) $ gdb --args rbx irb -f | |
GNU gdb 6.8-debian | |
Copyright (C) 2008 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "i486-linux-gnu"... |
This file contains 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
konstantin:~/Workspace/misc/rubinius-copy (git: master) $ uname --all | |
Linux localtoast 2.6.27-10-generic #1 SMP Fri Nov 21 12:00:22 UTC 2008 i686 GNU/Linux | |
konstantin:~/Workspace/misc/rubinius-copy (git: master) $ gdb --args bin/rbx -e "puts ObjectSpace.each_object { }" | |
GNU gdb 6.8-debian | |
Copyright (C) 2008 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "i486-linux-gnu"... |
This file contains 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
--- from irb, updated |
This file contains 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
#!/bin/bash | |
gem1.8 list --local --no-versions > 1.8.txt | |
gem1.9 list --local --no-versions > 1.9.txt | |
diff gem1.8.txt gem1.9.txt |
This file contains 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
#include "algorithms.h" | |
#include "dispatcher.h" | |
HANDLE Algorithm_EarliestDeadlineFirst(PLIST_ENTRY TaskList, ULONG Clock) { | |
PLIST_ENTRY ListEntry, Candidate; | |
HANDLE CandidateThreadHandle, ListEntryThreadHandle; | |
PDISPATCHER_TASK ListEntryTask; | |
PEDF_TASKINFO ListEntryTaskInfo, CandidateTaskInfo; | |
This file contains 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
ruby -e "loop { print '>> '; puts('=> ' + eval(gets).inspect) }" |
This file contains 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
#!/bin/sh | |
# Usage: git-thanks <since>..<until> | |
# | |
# All commits on master, ever: | |
# git-thanks master | |
# | |
# All commits on master since the 0.9.0 tag: | |
# git-thanks 0.9.0..master | |
git log "$1" | |
This file contains 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 "rubygems" | |
require "snmp" | |
mac = ARGV.shift.dup | |
unless mac.gsub! /^(..)[-: ]?(..)[-: ]?(..)[-: ]?(..)[-: ]?(..)[-: ]?(..)[-: ]?$/, '\1 \2 \3 \4 \5 \6' | |
puts "illegal mac" | |
exit | |
end | |
mac = mac.split(" ").collect { |hex| eval("0x#{hex}").to_s }.join "." |
OlderNewer