Skip to content

Instantly share code, notes, and snippets.

View pootsbook's full-sized avatar

Philip Poots pootsbook

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

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
olivierlacan / gist:4062929
Last active February 10, 2024 10:57 — forked from Gregg/gist:968534
Code School Screencasting Framework

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.
NewPersonValidator = Validator.define do
validates_presence_of :name
end
class Person
attr_accessor :name
def initialize(name); @name = name; end
end
person = Person.new("Frank")
@gilesbowkett
gilesbowkett / remotes.bash
Created May 1, 2013 20:54
github help article implemented as shell script. is there an easier way?
# based on the workflow from https://help.github.com/articles/syncing-a-fork
function fetch_remotes() {
for remote in $(echo $(git remote))
do
git fetch $remote
done
}
function hub_sync() {
@anthonysterling
anthonysterling / destroy-vagrant.sh
Created May 22, 2013 09:48
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`
do
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
fi
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
johnkoht / grid.css.sass
Last active January 1, 2022 23:21
Bootstrap 3 Style Grid built on Bourbon Neat
// Main containers
.container
@include outer-container
// Rows
.row
@include row()
// A basic column without a defined width or height
@wycats
wycats / app.js
Last active February 11, 2016 16:08
App.Router.map(function() {
this.resource('post', { path: '/posts/:post_id' });
});
App.PostRoute = Ember.Route.extend({
model: function(params) {
return this.store.find('post', params.post_id);
}
});