Skip to content

Instantly share code, notes, and snippets.

View andrew's full-sized avatar

Andrew Nesbitt andrew

View GitHub Profile
curl -XDELETE http://localhost:19200/twitter
curl -XPUT http://localhost:19200/twitter -d '{
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 1
}
},
"mappings" : {
"tweet" : {
@andrew
andrew / map.geojson
Last active August 29, 2015 14:02 — forked from afeld/map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrew
andrew / table.md
Last active August 29, 2015 14:08 — forked from RZRZR/table.md

6 day Timetable

Research (Part C) to be done as homework and presented to the group as part of the introductions.

Monday Tuesday Wednesday Thursday Friday Saturday
Morning Intro to Raspberry Pi. Staff Personal Intros (10mins x 3) Coach to London - Meet at RasPi HQ Make (A) Make (A) Plan Workshops (D) Deliver Workshops (D)
#! /usr/bin/ruby
## Elliott Kember's Delete MM_ Script.
# I bet you thought I wouldn't write this!
## Usage:
# $ ruby dreamcatcher.rb emailaddress password
## dreamcatcher.rb
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't wanker in technology
- a medium is not a grande
- break convention for your users
#!/usr/bin/env ruby
# -*- ruby -*-
require 'rubygems'
require 'daemon-spawn'
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
class DelayedJobWorker < DaemonSpawn::Base
def start(args)
ENV['RAILS_ENV'] ||= args.first || 'development'
#! /usr/bin/env ruby
#
# Save in your path as "isreg" and chmod +x. Then: isreg domain.com
#
puts `whois #{ARGV[0]}` =~ /No match for \"#{ARGV[0]}\"/mi ? "No" : "Yes"
// Attempt to make a drop-and-forget bunch of scripts that mimick some missing html5 goodies automatically
// Example:
// $(document).ready(function() {
// ProvideHtml5.autofocus()
// ProvideHtml5.datepicker()
// ProvideHtml5.forcenumber()
// })
var ProvideHtml5 = {
autofocus = function() {

If one was inclined to use the acts_as_yaffle pattern, they would probably use the second one, rather than the heavily cargo-culted first one.

// Provides a device_scale class on iOS devices for scaling user
// interface elements relative to the current zoom factor.
//
// http://37signals.com/svn/posts/2407-device-scale-user-interface-elements-in-ios-mobile-safari
// Copyright (c) 2010 37signals.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell