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
# https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference | |
grammar JS | |
rule program | |
(spacing statement spacing)* | |
end | |
rule statement | |
block / function / if_else / for_in / for / ternary / let / [^;\{\}]+ ';' { | |
def statements |
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 a = function(){ }; | |
a.prototype.wrong = 'Dave: mayor of wrongville'; | |
var b = function(){}; | |
b.prototype = new a; | |
var c = function(){}; | |
c.prototype = new b; | |
var d = new c; |
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
# Thursday | |
- 10:15 Writing Large Applications in JavaScript: Douglas Crockford | |
- 11:15 How to build an iPhone application in 45 minutes: Patrick Linskey | |
- 13:00 Domain Specific Languages and Language Oriented Programming: Amanda Laucher | |
- 14:00 Speeding Ducks: Avi Bryant | |
- 15:15 Fuzz-Testing Rails Apps with Tarantula: Glenn Vanderburg | |
- 16:15 How to do write tests/stories for RubyGems and Rails plugins: Dr Nic | |
- 17:15 Atlassian: An Australian Success Story: Mike Cannon-Brookes |
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 - The abbreviated weekday name (``Sun'') | |
%A - The full weekday name (``Sunday'') | |
%b - The abbreviated month name (``Jan'') | |
%B - The full month name (``January'') | |
%c - The preferred local date and time representation | |
%d - Day of the month (01..31) | |
%H - Hour of the day, 24-hour clock (00..23) | |
%I - Hour of the day, 12-hour clock (01..12) | |
%j - Day of the year (001..366) | |
%m - Month of the year (01..12) |
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 migrations = from m in typeof (WebConfigMigrator).GetMethods() | |
where m.Name.StartsWith("Migration_") | |
let migrationNumber = int.Parse(Regex.Match(m.Name, @"Migration_(\d+)").Groups[1].Value) | |
where migrationNumber > currentVersion | |
orderby migrationNumber | |
select m; |
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
(function($) { | |
$.fn.present = function(options) { | |
var self = this; | |
options = $.extend({ | |
// defaults | |
}, options); | |
$.extend(this, { | |
clicked: function(e) { |
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
using System.Collections; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using System.Linq; | |
using NUnit.Framework.Constraints; | |
namespace NUnit.Framework | |
{ | |
public static class AwesomeTestExtensions |
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
git init | |
git add . | |
git commit -m "Initial" | |
heroku create <APP> | |
heroku addons:add custom_domains | |
heroku domains:add <APP>.com | |
heroku domains:add www.<APP>.com | |
git push heroku master |
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
class ROpenStruct < OpenStruct | |
def initialize(hash=nil) | |
@table = {} | |
for k,v in hash | |
@table[k.to_sym] = wrap(v) | |
new_ostruct_member(k) | |
end | |
end | |
def wrap(value) |
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
class Object | |
def self.instance_methods_by_module | |
class_methods = [] | |
self.ancestors.reverse.each do |a| | |
new_methods = a.instance_methods.sort | |
class_methods.each do |cm| | |
new_methods = new_methods - cm[1] | |
end | |
class_methods << [ a.name, new_methods ] | |
end |
OlderNewer