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
#!/usr/bin/env ruby | |
# The "real" count of rubygems on github | |
lines = `gem list -r -s http://gems.github.com`.split("\n") | |
gems = lines.map{|line| line.split('-')[1].split[0]}.uniq | |
puts gems.size | |
# Outputs 3140 as of this writing. |
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 <iostream> | |
#include <iomanip> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
int main () | |
{ |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="facebook" class=" no_js"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="Content-language" content="en" /> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
CavalryLogger=false;window._is_quickling_index=""; | |
//]]> |
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
/* | |
HTTP Host: static.ak.fbcdn.net | |
Generated: April 26th 2010 3:53:31 PM PDT | |
Machine: 10.16.139.107 | |
Locale: nu_ll | |
Path: js/19khsprwvtvokwow.pkg.js | |
*/ | |
if (window.CavalryLogger) { CavalryLogger.start_js(["js\/19khsprwvtvokwow.pkg.js"]); } |
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
var date = new Date("Nov 7 2010 1:00 AM PDT"); | |
var bananas = new Date("Nov 7 2010 1:00 AM PDT"); | |
bananas > date //ok | |
// > false | |
bananas.setFullYear(2010) | |
// > 1289120400000 | |
bananas > date //what? | |
// > true | |
bananas.getTime() - date.getTime() |
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
twttr.txt.autoLinkWithEntities = function(text, entities) { | |
var result = []; | |
var allEntities = []; | |
var addEntities = function (key, array) { | |
if (entities[key]) { | |
array.push.apply(array, entities[key].map(function (ea) { return {type: key, value: ea}})); | |
}; | |
}; |
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
Total: 387 samples | |
87 22.5% 22.5% 121 31.3% Thrift::BaseTransport#read_all | |
77 19.9% 42.4% 77 19.9% garbage_collector | |
26 6.7% 49.1% 26 6.7% Thrift::FramedTransport#read | |
25 6.5% 55.6% 181 46.8% Object#read | |
21 5.4% 61.0% 70 18.1% ActiveSupport::JSON.encode | |
18 4.7% 65.6% 199 51.4% Object#receive_message | |
16 4.1% 69.8% 27 7.0% RainbirdClient#encode | |
14 3.6% 73.4% 14 3.6% Array#include? | |
11 2.8% 76.2% 65 16.8% Array#to_json |
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
irb(main):001:0> def method_missing(*args) | |
irb(main):002:1> puts 'method missing' | |
irb(main):003:1> end | |
=> nil | |
irb(main):004:0> require 'rubygems' | |
=> true | |
irb(main):005:0> require 'activesupport' | |
method missing | |
method missing | |
method missing |
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
if appIsRunning("Rdio") then | |
tell application "Rdio" to playpause | |
else if appIsRunning("iTunes") then | |
tell application "iTunes" to playpause | |
end if | |
on appIsRunning(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end appIsRunning |
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
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require 'stringio' | |
require 'rubygems' | |
require 'ruby-debug' | |
lines = [] | |
ARGF.each_line do |ea| | |
# strip bash color codes |
OlderNewer