Skip to content

Instantly share code, notes, and snippets.

View wprater's full-sized avatar

Will Prater wprater

View GitHub Profile
wprater / Rakefile
Last active August 29, 2015 14:01
Build RubyMotion for an adhoc environment.
# -*- coding: utf-8 -*-
require 'motion/project/template/ios'
require 'bundler'
rescue LoadError
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
:host {
position: absolute;
width: 100%;
height: 100%;
wprater / php-cgi.rb
Created May 25, 2012 15:49 — forked from daz/php-cgi.rb
Homebrew Formula for PHP 5.4.3 as php-cgi (for nginx, etc.)
# Homebrew Formula for PHP 5.4.3 as php-cgi (for nginx, etc.)
require 'formula'
class PhpCgi <Formula
wprater /
Created August 21, 2012 09:13
RubyMotion module for SublimeLinter bundle for Sublime Text.
from ruby import Linter
'language': 'RubyMotion',
'executable': '/Library/RubyMotion/bin/ruby',
'lint_args': '-wc'
wprater / Rakefile
Created August 22, 2012 14:08
Setup file for RubyMotion to build Cordova apps.
require 'motion/project'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings. = 'MyJavaScriptApp'
app.version = '1.0'
# My setup is a bit different, as Im building for many environements and the
# main app is written in JavaScript.
wprater / app_delegate.rb
Created August 22, 2012 21:23
Minimal ruby files for Cordova and RubyMotion.
class AppDelegate
def init
cookieStorage = NSHTTPCookieStorage.sharedHTTPCookieStorage
cookieStorage.cookieAcceptPolicy = NSHTTPCookieAcceptPolicyAlways
wprater / resourceful.js
Created August 28, 2012 13:43
What is the preferred way to define a resourceful schema?
// Opt. 1 from resourceful Readme, examples, tests, etc.
var Creature = resourceful.define('creature', function () {
// Opt. 2 from other Flatiron project examples
Creature = resourceful.define('creature');'type', String, { default: "dragon" });
wprater / store.js
Created August 29, 2012 21:43
Is there another way to apply a filter when specifying the store through a config option.
xtype: 'list',
flex: 1,
store: 'localEntriesStore',
itemTpl: '{full_name}',
listeners: {
activate: function(list, opts) {
return list.getStore().filterBy(function(rec) {
return rec.get('needs_remote_sync');
wprater /
Last active December 17, 2015 22:29 — forked from dandavison/
class BaseChart
width: 100
height: 100
_margin: {}
@margin: top: 0, right: 0, bottom: 0, left: 0

#How to install node.js on a Google Compute Engine instance

Start and ssh into instance

Make sure you have a Google Compute engine account, have a project created and the gcutil command line tool installed.

Since want to ssh without the gcutil tool, you need to a your ssh key to the instance in addition to the already existing google_compute_engine key (used for gcutil).