Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
"""
Created on Thu Apr 18 13:10:10 2013
@author: Owner
"""
import sys
import csv
import time
# Usage:
# The following will create 5 randomized cards from the lines of gawkerbingo.txt:
# ruby bingorunner.rb 5
require './gawkerbingo.rb'
number_of_cards = ARGV.first.to_i
CreateCards.new(number_of_cards)
@knowtheory
knowtheory / gist:2709760
Created May 16, 2012 11:45
Backbone confusion
var test = Backbone.Model.extend({
var1 : [],
initialize : function(obj) {
this.var1.push("1")
console.log(this.var1.length, this.cid)
}
});
var x = (new test);

"I am looking forward to accelerating Ruby's progress" - Q&A with Matz regarding joining Heroku as a chief architect.

Date: 13th July 2011

Introduction

As mentioned in my previous article, It has been announced that Yukihiro Matsumoto (Matz) is joining Heroku as Chief Architect of Ruby. I asked Matz about the story behind his future role via email.

My mission is to make Ruby core more functional and higher quality.

#!/usr/bin/env ruby -Ku
# encoding: utf-8
require 'fileutils'
require 'pathname'
require 'addressable/uri'
require 'ruby-github' # TODO: replace ruby-github with something better maintained
require "bundler"
Bundler.setup
require "dm-core"
require "dm-types"
require "dm-migrations"
DataMapper.setup(:default, "mysql://localhost/test")
class User

Rails 3.0.pre on App Engine

You can Rails 3 on App Engine, but it won’t be especially useful until bundler 10. You should try these instead:

Install the Development Environment

The gems for the development environment include a pre-release appengine-tools gem that provides a pre-release version of jruby-rack.

= Ruby Packaging Standard
The aim of this document is two-fold. First, to specify a common
structure of how a Ruby package distributed as source (that is, but
not limited to, development directories, version-controlled
repositories, .tar.gz, Gems, ...) should conform to.
Second, to document common and proven ways to structure Ruby packages,
and to point out certain anti-patterns that sneaked into common use.
It is by intent not to innovate.
module Addressable
include DataMapper::Resource
is :remixable
# ...
end
module Linkable
include DataMapper::Resource
is :remixable
# ...
module Addressable
include DataMapper::Resource
is :remixable
# ...
end
module Linkable
include DataMapper::Resource
is :remixable
# ...