Skip to content

Instantly share code, notes, and snippets.

Project.find_by_sql('select * from projects where featured = 1 and public = 1 and recent = 1 order by RAND() limit 1')[0]
{"json"=>"{\"first_name\":\"Allen\",\"uid\":\"670831017\",\"session_id\":\"3866d66d26dc80ab01f5b4ab-670831017\",\"last_name\":\"Hujsak\",\"pic_square\":\"http://missionvi.code-examples.net/proxy.php?url=http%3A//profile.ak.fbcdn.net/v228/1407/76/q670831017_1549.jpg&mimeType=image/jpeg\",\"email\":\"apps+271382725889.670831017.aa221e0e5f9be134154f36bec0140073@proxymail.facebook.com\"}"}
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
irb(main):002:0> [[{"id" => 102}], {"id" => 102}].flatten.uniq
=> [{"id"=>102}, {"id"=>102}]
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]
>> [[{"id" => 102}], {"id" => 102}].flatten.uniq
=> [{"id"=>102}]
WTF?
- Afghanistan
- Aland Islands
- Albania
- Algeria
- American Samoa
- Andorra
- Angola
- Anguilla
- Anonymous Proxy
- Antarctica
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
desc "Show ps"
task :ps do
run 'ps ax' do | channel, stream, data |
puts data if stream == :out
if stream == :err
puts "[err: #{channel[:host]}] #{data}"
break
end
end
end
//
// dice.h
// craps
//
// Created by Clayton Lengel-Zigich on 7/26/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
@interface Dice : NSObject
Process: webkit_server [46084]
Path: /Users/integrum/.rvm/gems/ruby-1.9.2-p136@bookmans/gems/capybara-webkit-0.1.6/bin/webkit_server
Identifier: webkit_server
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: ruby [46071]
Date/Time: 2011-04-14 11:05:21.759 -0700
OS Version: Mac OS X 10.6.7 (10J869)
Report Version: 6
@clayton
clayton / my_acceptance_test_spec.rb
Created April 14, 2011 18:21
Supporting gist for
# https://github.com/thoughtbot/capybara-webkit/issues/14
feature "My Feature", "Description", :js => true do
background do
# some setup
visit my_starting_path
end
context "Story Name" do
context "When I follow path A" do
@clayton
clayton / ffmpeg-install.sh
Created August 9, 2013 18:55
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm