Skip to content

Instantly share code, notes, and snippets.

View aitor's full-sized avatar
👊
Working!

Aitor García Rey aitor

👊
Working!
View GitHub Profile
[Dettifoss] ruby 1.8.7-p352 in ~/
› dig www.24hourbookclub.com
; <<>> DiG 9.7.3-P3 <<>> www.24hourbookclub.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44930
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
› ll writers-watching-football
total 48
drwxr-xr-x 10 aitor staff 340B Jun 11 15:28 .git
-rw-r--r-- 1 aitor staff 83B Jun 8 15:34 Gemfile
-rw-r--r-- 1 aitor staff 1.1K Jun 8 15:34 Gemfile.lock
-rw-r--r-- 1 aitor staff 28B Jun 7 23:42 Procfile
-rw-r--r-- 1 aitor staff 1.6K Jun 10 22:34 bot.rb
drwxr-xr-x 6 aitor staff 204B Jun 8 17:51 data
-rw-r--r-- 1 aitor staff 598B Jun 8 16:35 scrap.rb
-rw-r--r-- 1 aitor staff 470B Jun 10 22:39 writer.rb
1936 - Modern Times
1940 - The Grapes Of Wrath
1949 - The Third Man
1954 - Dial M for Murder
1954 - On the Waterfront
1956 - The Searchers
1957 - Paths of Glory
1957 - The Seventh Seal
1962 - The Man Who Shot Liberty Valance
1962 - The Manchurian Candidate
# Because you know, db:pull is fucking slow...
function backup:pull () {
name=$(heroku info --raw | grep "^name=" | cut -d= -f2)
echo "Loading '$name' app's data in local database."
heroku pgbackups:capture --expire
curl -o latest.dump `heroku pgbackups:url`
pg_restore --verbose --clean --no-acl --no-owner -d $name latest.dump
rm -fr latest.dump
}
Said President John F. Kennedy to a group of Nobel Prize winners at a White
House dinner, “I think this is the most extraordinary collection of talent
that has ever gathered at the White House—with the possible exception of when
Thomas Jefferson dined alone.”
@aitor
aitor / gist:2912192
Created June 11, 2012 19:40
WWDC 2012 Data
  • Apple's App Store has 400m accounts with credit cards and quick-buying. This is the store with the largest number of credit cards on file anywhere in the world.(source)
  • There are over 650,000 apps in the Apple App store. 225,000 for the iPad. (source)
  • Customers have downloaded over 30 billion apps from the Apple App Store. (source)
  • Apple has paid out over $5 billion dollars to app developers. (source)
  • The Apple App Store store operates in It operates in 120 countries around the world. Apple added an additional 32 countries today. (source)
  • Apple sold 40million copies of their latest operating system (Lion). Over 40% of OSX moved to Lion in just 9 months. (source)
  • There are over 125 million iCloud users. ([so
<html>
<head>
</head>
<body>
<canvas id="c"></canvas>
</body>
<script>
$('#videodeck').html(
'<iframe id="playing_video" src="'+ video_url +'&player_id=playing_video" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'
);
var iframe = $('#playing_video')[0], player = $f(iframe);
player.addEvent('ready', function() {
player.api("play");
player.addEvent('finish', return_slidedeck);
});
class VgVimeo
def initialize(url=nil, options={})
# general settings
@url = url
@video_id = parse_url(url)
res = Net::HTTP.get(URI.parse("http://vimeo.com/api/v2/video/#{@video_id}.xml"))
@feed = REXML::Document.new(res)
end
require 'rubygems'
require 'digest/md5'
require 'sinatra'
require 'RMagick'
include Magick
get '/avatar' do
format = 'png'
content_type format