Skip to content

Instantly share code, notes, and snippets.

View whatupdave's full-sized avatar

Dave Newman whatupdave

  • Twitter
  • Seattle, WA
View GitHub Profile
## Getting Started
1. Sign up at Assembly ([https://assemblymade.com](https://assemblymade.com))
2. Create a Task for the work
3. Create your feature branch (`git checkout -b my-new-feature`)
4. Commit your changes, you can reference the task number (`git commit -am 'Add some feature for #123'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create new Pull Request
@whatupdave
whatupdave / heroku_go_fail.sh
Created February 22, 2014 21:47
Failed Heroku Go deploy
-----> Fetching custom git buildpack... done
-----> Go app detected
-----> Installing go1.2... done
-----> Running: godep go install -tags heroku ./...
lib/account_handlers.go:10:2: cannot find package "github.com/codegangsta/martini" in any of:
/app/tmp/cache/go1.2/go/src/pkg/github.com/codegangsta/martini (from $GOROOT)
/tmp/build_51524be4-fbbf-40c6-a80b-757320129dfb/.heroku/g/src/github.com/asm-products/readraptor/Godeps/_workspace/src/github.com/codegangsta/martini (from $GOPATH)
/tmp/build_51524be4-fbbf-40c6-a80b-757320129dfb/.heroku/g/src/github.com/codegangsta/martini
lib/account.go:9:2: cannot find package "github.com/coopernurse/gorp" in any of:
/app/tmp/cache/go1.2/go/src/pkg/github.com/coopernurse/gorp (from $GOROOT)
@whatupdave
whatupdave / readraptor-grabs.coffee
Created April 23, 2014 17:24
Read Raptor screenshot grabs with casperjs
casper = require("casper").create()
root = "http://0.0.0.0:5000"
pages = [{
delay: 5000,
name: "home"
path: "/"
}, {
name: "account"
path: "/confirm/4d178542b72dc85dacf43fc19c2b9041b02fe0eb"
}, {
@whatupdave
whatupdave / json_pq_error.go
Last active August 29, 2015 14:02
JSON load failed with lib/pq
package main
import (
"database/sql"
"encoding/json"
"fmt"
_ "github.com/lib/pq"
)
@whatupdave
whatupdave / connectToStores.js
Last active August 29, 2015 14:21
connectToStores
import React from 'react'
export default function connectToStores(...stores) {
return function(Component) {
return class StoreConnection extends React.Component {
constructor(props) {
super(props)
this.state = Component.getPropsFromStores()
this.handleStoresChanged = this.handleStoresChanged.bind(this)
}
# 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
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;
# 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
%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)
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;