Skip to content

Instantly share code, notes, and snippets.

View imajes's full-sized avatar

James Cox imajes

View GitHub Profile
## code:
this is a before_save
def save_proper_images
screenshots = []
thumbnails = []
app_images.each do |ai|
case ai["type"]
when "AppBundleIcon"
(President Bartlet is alone in the cavernous National Cathedral. He looks down at his shoes, then after a while looks up.)
You’re a son of a bitch, You know that? She bought her first new car and You hit her with a drunk driver. What? Is that supposed to be funny?
“You can’t conceive, nor can I, the appalling strangeness of the mercy of God,” says Graham Greene. I don’t know who’s ass he was kissing there, because I think You’re just vindictive. What was Josh Lyman? A warning shot? That was my son. What did I ever do to Yours but praise His glory and praise His name?
There’s a tropical storm that’s gaining speed. Power. They say we haven’t had a storm this bad since You took out that tender ship of mine in the North Atlantic last year. Sixty-eight crew. Do you know what a tender ship does? It fixes the other ships. It doesn’t even carry guns. It just goes around, fixes the other ships, and delivers the mail. That’s all it can do.
(Sarcastically.) Gratias tibi ago, domine. [Transaltion: Thank You, Lord
#These all pass the specs in post_create_with_stubble_spec.rb, but not necessarily the other ones
def create
@registration = Registration.new(params[:registration])
if @registration.save
redirect_to registrations_path
else
render :action => 'new'
end
end
>> p n.poll_mifare
(NFC) ISO14443A Tag
ATQA (SENS_RES): 04 00
UID (NFCID1):
SAK (SEL_RES): 00
=> nil
>> p n.poll_mifare
(NFC) ISO14443A Tag
ATQA (SENS_RES): 04 00
UID (NFCID1): 9c f8 99 1f 00 00 00
00100 allow ip from any to any via lo*
00110 deny ip from 127.0.0.0/8 to any in
00120 deny ip from any to 127.0.0.0/8 in
00130 deny ip from 224.0.0.0/3 to any in
00140 deny tcp from any to 224.0.0.0/3 in
01000 allow ip from any to me dst-port 3283,5900,5988 in
01100 allow ip from any to me dst-port 22 in
01200 allow ip from any to me dst-port 9091 in
01300 allow tcp from any to any out
01300 allow tcp from any to any established
You might have expected an instance of Array.
The error occurred while evaluating nil.map
/opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:272:in `activate'
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:in `require'
/Users/james/Sites/difftracker/vendor/rails/activeresource/lib/../../activesupport/lib/active_support/dependencies.rb:167:in `require'
/Users/james/Sites/difftracker/vendor/rails/activeresource/lib/../../activesupport/lib/active_support/dependencies.rb:537:in `new_constants_in'
/Users/james/Sites/difftracker/vendor/rails/activeresource/lib/../../activesupport/lib/active_support/dependencies.rb:167:in `require'
% gem env
RubyGems Environment:
Dependencies of xorg-libXext:
xorg-libX11
xorg-libXdmcp
xorg-xproto
pkgconfig
xorg-libXau
pkgconfig
xorg-xproto
xorg-bigreqsproto
xorg-xcmiscproto
% sudo port install libpcap
---> Computing dependencies for libpcap
---> Fetching libpcap
---> Verifying checksum(s) for libpcap
---> Extracting libpcap
---> Applying patches to libpcap
---> Configuring libpcap
---> Building libpcap
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_libpcap/work/libpcap-1.0.0" && /usr/bin/make -j2 all shared " returned error 2
Command output: /usr/bin/gcc-4.2 -O2 -fno-common -O2 -arch x86_64 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_image.c
% rvm list
ruby:
jruby:
jruby-1.3.1 : jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
ree:
50599/0x75b0f: 16907883 7 3 stat64("/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/rubygems.rb\0", 0x7FFF5FBFBF50, 0x0) = -1 Err#2
50599/0x75b0f: 16907888 6 2 stat64("/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/rubygems.bundle\0", 0x7FFF5FBFBF50, 0x0) = -1 Err#2
50599/0x75b0f: 16907891 4 1 stat64("/Users/james/.rip/active/lib/rubygems.rb\0", 0x7FFF5FBFBF50, 0x0) = -1 Err#2
50599/0x75b0f: 16907894 4 1 stat64("/Users/james/.rip/active/lib/rubygems.bundle\0", 0x7FFF5FBFBF50, 0x0) = -1 Err#2
50599/0x75b0f: 16907898 5 2 stat64("/opt/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/bin/rubygems.rb\0", 0x7FFF5FBFBF50, 0x0) = -1 Err#2
50599/0x75b0f: 16907903 5 2 stat64("/opt/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/bin/rubygems.bundle\0", 0x7FFF5FBFBF50, 0x0) = -1 Err#2
50599/0x75b0f: 16907907 5 2 stat64("/opt/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/rubygems.rb\0", 0x7FFF5FBFBF50, 0x0