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
// MIT http://rem.mit-license.org | |
function trim(c) { | |
var ctx = c.getContext('2d'), | |
copy = document.createElement('canvas').getContext('2d'), | |
pixels = ctx.getImageData(0, 0, c.width, c.height), | |
l = pixels.data.length, | |
i, | |
bound = { | |
top: null, |
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 "benchmark" | |
N = (ARGV.shift || 40).to_i | |
def fib(n) | |
return n if n < 2 | |
fib(n-2) + fib(n-1) | |
end | |
Benchmark.bmbm do |x| |
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
development: | |
adapter: mysql2 | |
encoding: utf8 | |
reconnect: false | |
database: rails_proj_development | |
pool: 5 | |
username: rp_dev | |
password: wootwoot | |
host: localhost |
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
/** | |
* DSL for imagemagick-style geometry strings | |
* See http://www.imagemagick.org/Magick++/Geometry.html for description | |
* Note: offesets are not supported | |
* | |
* Implements following constructs | |
* | |
* <width> x <height> - Rect | |
* <Rect> <Qualifier> (where qualifier is !/%/>/<) - Geometry | |
* |
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
$ wget "http://createyourproglang.com/download.php?cbreceipt=WPXCNE6F&time=1302748966&item=1&cbpop=D8F9D688" | |
--2011-04-13 23:11:24-- http://createyourproglang.com/download.php?cbreceipt=WPXCNE6F&time=1302748966&item=1&cbpop=D8F9D688 | |
Resolving createyourproglang.com... 173.236.190.249 | |
Connecting to createyourproglang.com|173.236.190.249|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 41189241 (39M) [application/zip] | |
Saving to: `download.php?cbreceipt=WPXCNE6F&time=1302748966&item=1&cbpop=D8F9D688' | |
51% [=======================================> ] 21,100,649 65.8K/s in 5m 30s |
-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfile
or--skip-bundle
. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
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
# | |
# A C Parser using the Parslet library. | |
# | |
# ANSI C Grammar: | |
# | |
# * http://www.lysator.liu.se/c/ANSI-C-grammar-l.html | |
# * http://www.lysator.liu.se/c/ANSI-C-grammar-y.html | |
# | |
require 'parslet' |
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
<?php | |
function doubleclick_adplanner() { | |
$data = file_get_contents('http://www.google.com/adplanner/static/top1000/'); | |
preg_match_all('/href=["\']([^"\']+)?["\']target=["\']_blank/im',$data,$matches); | |
return implode("\n",$matches[1]); | |
} | |
function alexa_global($num = 500) { | |
static $topsites; |
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
// ---------------------- | |
// NO <?php TAG! | |
// ---------------------- | |
// ---------------------- | |
// SIGNIFICANT WHITESPACE ELIMINATES THE NEED | |
// FOR CURLY BRACES (YAY) | |
// ---------------------- | |
class Sessions extends MY_Controller |