Skip to content

Instantly share code, notes, and snippets.


Philip Poots pootsbook

  • ClubCollect
  • Alphen aan den Rijn, NL
View GitHub Profile
testcollab / an_example_usage.rb
Created Sep 22, 2011
Editing a File via the GitHub API v3
View an_example_usage.rb
require 'editor.rb'
ed ='testcollab/rails-test')
if ed.update_file('README.txt', 'my message', 'my new content')
ed.set_author('Scott', '')
ed.update_file('README.2.txt', 'my message', 'my new content')
byrichardpowell / gist:3857905
Created Oct 9, 2012
Model Fetch Unit Test
View gist:3857905
describe("A Model should", function() {
describe( "have a fetch method that", function() {
beforeEach(function() {
urls = ['url1', 'url2', 'url3', 'url4', 'url5']
spyOn( $, 'ajax');
masonforest / gist:4048732
Created Nov 9, 2012
Installing a Gem on Heroku from a Private GitHub Repo
View gist:4048732

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

  1. Get an OAuth Token from GitHub

First you will need to get an OAuth Token from GitHub using your own username and "note"

olivierlacan / gist:4062929
Last active May 1, 2021 — forked from Gregg/gist:968534
Code School Screencasting Framework
View gist:4062929

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
View usage.rb
NewPersonValidator = Validator.define do
validates_presence_of :name
class Person
attr_accessor :name
def initialize(name); @name = name; end
person ="Frank")
gilesbowkett / remotes.bash
Created May 1, 2013
github help article implemented as shell script. is there an easier way?
View remotes.bash
# based on the workflow from
function fetch_remotes() {
for remote in $(echo $(git remote))
git fetch $remote
function hub_sync() {
anthonysterling /
Created May 22, 2013
Finds all running Vagrant instances, recursively, from with in the current folder. It then shuts them down, deletes the VM, and removes the .vagrant file.
#!/usr/bin/env bash
for config in `find . -type f -name .vagrant`
uuid=`cat "$config" | php -r 'echo json_decode(fgets(STDIN))->active->default;'`
if VBoxManage showvminfo $uuid > /dev/null 2>&1; then
if VBoxManage showvminfo $uuid --machinereadable | egrep -q 'VMState="running|paused|stuck"'; then
VBoxManage controlvm $uuid poweroff
VBoxManage unregistervm $uuid --delete
rm -f "$config"

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

johnkoht / grid.css.sass
Last active Jan 1, 2022
Bootstrap 3 Style Grid built on Bourbon Neat
View grid.css.sass
// Main containers
@include outer-container
// Rows
@include row()
// A basic column without a defined width or height
View app.js {
this.resource('post', { path: '/posts/:post_id' });
App.PostRoute = Ember.Route.extend({
model: function(params) {
return'post', params.post_id);