Skip to content

Instantly share code, notes, and snippets.

View jimwhimpey's full-sized avatar

Jim Whimpey jimwhimpey

View GitHub Profile
CREATE TABLE `products` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`merchant_id` int(11) DEFAULT NULL,
`merchant_name` text,
`merchant_product_id` text,
`name` text,
`url_merchant` text,
`url_affiliate` text,
`description` text,
`price_gbp` float DEFAULT NULL,
When I try to run this:
sudo heroku db:push mysql://root:pass@localhost/booksale
I get this:
Taps 0.3 Load Error: no such file to load -- taps/operation
You may need to install or update the taps gem to use db commands.
On most systems this will be:
# Fresh ruby 1.9.2, rubygems 1.3.7 and Sinatra 1.0 installs on OS X
# This is the contents of test.rb:
require 'rubygems'
require 'sinatra'
get '/' do
haml :test
end
class WFModule
include DataMapper::Resource
storage_names[:default] = 'Modules'
property :id, Serial, :field => 'ModuleID'
property :module_name, String, :field => 'ModuleName'
property :module_fields, String, :field => 'ModuleFields'
property :parameters, String, :field => 'ModuleParameters'
property :author, String, :field => 'ModuleAuthor'
property :issue, String, :field => 'ModuleIssue'
property :deprecated, String, :field => 'ModuleDeprecated'

Context

Certain conferences have adapted a "Code of Conduct", all derived from the same text. e.g. http://jsconf.com/codeofconduct.html e.g. https://us.pycon.org/2013/about/code-of-conduct/

While I agree with the intent, I strongly object to the particularly wording, for the following reasons:

  • The only thing it's concerned with is harassment, setting a very negative tone. It suggests that unless warned, monitored and policed, many conference attendees will intimidate, insult, grope and stalk each other. It presumes the worst and treats exceptions as the norm. This does not match the actual experience of attendees at events.
@jimwhimpey
jimwhimpey / input-example.js
Created April 4, 2016 18:43
Example of justified-layout input
[{
width: 400,
height: 300
},
{
width: 300,
height: 300
},
{
width: 250,

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

sfasdfas

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

@jimwhimpey
jimwhimpey / setup.js
Created April 26, 2016 23:09
Setting up the Flickr SDK
var Flickr = require('flickr');
var flickr = new Flickr({
"apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"apiSecret": "xxxxxxxxxxxxxxxx",
"accessToken": "xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx",
"accessTokenSecret": "xxxxxxxxxxxxxxxx"
});
@jimwhimpey
jimwhimpey / photostream.js
Created April 26, 2016 23:25
Flickr SDK example photostream request
flickr
.request()
.people("40575690@N00") // ID or path alias
.media()
.get()
.then(function (response) {
// An array of media objects belonging to the person
}, function (err) {
// Any errors returned
});
@jimwhimpey
jimwhimpey / curl.sh
Created April 26, 2016 23:26
Flickr API cURL request
curl 'https://api.flickr.com/services/rest/' \
-d name=testing \
-d method=flickr.test.echo \
-d api_key=112d5d9e13e0c43e109233ff391f96ba