Skip to content

Instantly share code, notes, and snippets.

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

@crcastle
crcastle / LeaveVoicemail.js
Created November 10, 2010 05:13
Prompts user to leave voicemail, then records up to 5 minutes
[
{"name":"playback","filename":"vm-theperson"}
,{"name":"playback","filename":"vm-isunavail"}
,{"name":"playback","filename":"vm-leavemsg"}
,{"name":"playback","filename":"beep"}
,{"name":"Record","filename":"sounds/voicemail_test.wav","maxduration":"300"}
]
@crcastle
crcastle / IncomingCallExt1.js
Created November 10, 2010 05:35
Accept incoming call, forward to extension 1 for 20 seconds, then send to voicemail URL
[
{"name":"Dial","destination":"1","url":"http://llama.fm","timeout":"20"}
]
@crcastle
crcastle / cloudvox.rb
Created December 4, 2010 20:54
Talk to cloudvox web API
require 'yaml'
require 'rest_client'
require 'json'
class Cloudvox
def initialize
@cv_config = YAML.load_file 'cloudvox_account.yml'
#cloudvox_account.yml format
#
@crcastle
crcastle / gist:1124075
Created August 3, 2011 23:00
C4's janky stuff
<?php
require_once("Net/SSH2.php");
$passwd='sup3rs3cr3t';
$user='username';
$server='remoteserver.com';
$ssh = new Net_SSH2($server);
if (!$ssh->login($user, $passwd)) {
exit('Login Failed');
}
$who = $ssh->exec('whoami');
@crcastle
crcastle / file1.js
Created September 3, 2011 03:56 — forked from TooTallNate/file1.js
module.exports = function (a, b) {
return a + b
}
// Production steps of ECMA-262, Edition 5, 15.4.4.18
// Reference: http://es5.github.com/#x15.4.4.18
if (!Array.prototype.forEach) {
Array.prototype.forEach = function( callback, thisArg ) {
var T, k;
if ( this == null ) {
throw new TypeError( " this is null or not defined" );
}
var O = Object(this);
var len = O.length >>> 0;
@crcastle
crcastle / autoclose_janus
Created September 5, 2011 23:51 — forked from jackkinsella/autoclose_janus
How to add autoclose to Janus
#~/.janus.rake file
vim_plugin_task "autoclose", "git://github.com/Townk/vim-autoclose.git"
#~/vimrc.local file
let g:AutoClosePairs = {'(': ')', '{': '}', '[': ']', '"': '"', "'": "'", '#{': '}', '|':'|' }
let g:AutoCloseProtectedRegions = ["Character"]
@crcastle
crcastle / gist:1295761
Created October 18, 2011 15:46
What to do if a BigTuna build job hangs
# log on to big tuna box
# become tuna user
sudo su tuna
# stop the delayed_job process
cd /home/tuna/bigtuna
RAILS_ENV=production ./script/delayed_job stop
# clear the job queue
RAILS_ENV=production bundle exec rake jobs:clear
@crcastle
crcastle / gist:1524814
Created December 27, 2011 19:04 — forked from arnorhs/gist:1517095
gitopen - Open all files from a git diff or show command
#!/bin/bash
# This script will open all files from a git diff or a git show in vim.
# My bash skills are a bit primitive so this can probably be done more intelligently
# Usage:
# gitopen -- opens all added files that have changed since HEAD
# gitopen diff HEAD -- these are the default parameters
# gitopen diff master -- opens files that have changed from master