Skip to content

Instantly share code, notes, and snippets.

View deathbearbrown's full-sized avatar

Sue Lockwood deathbearbrown

  • Seattle, WA
View GitHub Profile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.13.71"
config.vm.synced_folder ".", "/mnt/"
config.ssh.forward_agent = true
server {
listen 80;
server_name auth.dev;
root /mnt/src;
location / {
index index.php index.html;
try_files $uri $uri/ /index.php?$request_uri;
}
@deathbearbrown
deathbearbrown / gist:3ed1687f05be88c81567
Created July 10, 2015 15:29
Sonic Pi: Sailor Moon Theme
play :C4, amp: 0.1
sleep 0.25
play :F4, amp: 0.2, pan: 1
sleep 0.25
play :GS4, amp: 0.4
sleep 0.25
play :C5, pan: -1
sleep 0.24
play :C5, amp: 0.2
sleep 0.24

Setting Up a Remote Server on AWS

Log into WFMU's aws with the credentials that you got from Jeff. Go to EC2 on that insanely cluttered menu, the icon is orange and it's up top on the left.

CREATE AN INSTANCE:
Start an instance by clicking that big blue button:

  • Select your VM image. Most of our apps use an Ubuntu 64-bit image, which is the last option in the list.
  • NEXT: Instance type, use Micro instances (t1.micro) for now and we can change it later :)
@deathbearbrown
deathbearbrown / gist:59107523c419a1a911dd
Created April 30, 2015 19:12
An example of interacting with a model
<?php
require_once(__DIR__ . 'autoload.php');
require_once(API_BASE_PATH . '/utils/base-model.php');
$campaign = new CampaignModel();
$campaign->title = 'testing';
$campaign->save(); //created
$campaign->title = 'boogers';
import DS from 'ember-data';
var Pledge = DS.Model.extend({
amount: DS.attr('float'),
pledge_type: DS.attr('integer'),
swag: DS.hasMany('rewards', {async: true}),
prizes: DS.hasMany('prizes', {async: true}),
premiums: DS.hasMany('premiums', {async: true}),
first_name: DS.attr('string'),
var five = require("../lib/johnny-five");
var Lever = require("./lever")(five);
var board = new five.Board();
board.on("ready", function() {
var pins = [1, 2, 3, 4, 5];
var levers = pins.map(function(pin) {
return new Lever(pin);
});

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

Preheat the oven to 350F. Line a 9x13 pan with parchment. (Or spray-oil, but this is a pretty sticky cake.)
6 egg yolks
3/4c sugar
Put in stand mixer with the whisk and blend for ~10 minutes. They'll get thick and pale and beautiful.
8oz toasted walnuts, almonds, or pecans, ground to a semi-fine consistency (think breadcrumbs, not flour)
1/2t ground cardamom
2.5oz breadcrumbs or gluten-free flour mix (we use Pamela's pancake/waffle mix for this)
var five = require("johnny-five");
var Spark = require("spark-io");
var board = new five.Board({
io: new Spark({
token: "a81cf99a8c1fe45b74d749d521a32671eb443d5e",
deviceId: "53ff6f065067544840551187"
})
});