Public Gists by duncanbeevers

gist: 195554 Wikel Tripel Map Projection...
Gravatar
Mon Sep 28 09:44:35 -0700 2009
1
2
3
# Usage
# projection = MapProjection::WinkelTripel.new(w, h)
# projections.project( latitude, longitude)
Gravatar
Thu Jun 25 13:06:44 -0700 2009
1
2
3
var EventDispatcher = (function() {
  var api = {
    addEventListener: function(event, callback) {
Gravatar
Thu May 14 14:59:21 -0700 2009
1
2
3
Prototype.CrossFrame = function() {
  // Common functionality
  var url_src_matcher = /^(https?:\/\/.+)\??.*/,
Gravatar
Sun May 03 08:55:45 -0700 2009
1
2
3
(function() {
  var s = "prefix arg1\narg2",
      expected_capture = "arg1\narg2",
Gravatar
Wed Apr 29 23:03:46 -0700 2009
1
2
3
Array.prototype.binarySearch = function binarySearch(find, comparator, insert) {
  if (!comparator) {
    comparator = function(a,b) {
Gravatar
Fri Apr 24 16:35:35 -0700 2009
1
2
3
holodeck.addChatCommand('me', function(holodeck, input) {
  var m = input.match(/^\/([^\s]+)\s+(.+)$/) || [],
      cmd = m[1],
Gravatar
Tue Mar 17 16:55:36 -0700 2009
1
2
3
/*
  Buffer up calls to groups of functions, unwind stack when precondition is met.
  
Gravatar
Mon Mar 09 21:33:24 -0700 2009
1
2
3
<html>
  <head>
    <title>Form Submit Test</title>
Gravatar
Fri Feb 27 10:01:39 -0800 2009
1
2
3
class Tag < ActiveRecord::Base
  has_many :taggings
end
Gravatar
Tue Sep 30 22:19:06 -0700 2008
1
sudo env ARCHFLAGS='-arch i386' gem install cairo
Gravatar
Thu Aug 28 01:28:24 -0700 2008
1
2
3
module Insert
  def self.included(model)
    model.class_inheritable_accessor :insert_max_rows
Gravatar
Wed Aug 20 13:58:10 -0700 2008
1
2
3
class Article < ActiveRecord::Base
  named_scope :with_total_articles_published,
    :select => 'articles.*, COUNT(*) AS total_articles_published',
Gravatar
Wed Jul 30 10:24:43 -0700 2008
1
2
3
namespace :db do
  namespace :schema do
    task :load => :alias_create_table