Skip to content

Instantly share code, notes, and snippets.

@crcastle
crcastle / file1.js
Created September 3, 2011 03:56 — forked from TooTallNate/file1.js
module.exports = function (a, b) {
return a + b
}
@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 / nodejs.sh
Created December 29, 2010 00:39
Node.js tartup script for AWS EC2 Linux box
#!/bin/bash
# nodejs - Startup script for node.js server
# chkconfig: 35 85 15
# description: node is an event-based web server.
# processname: node
# server: /path/to/your/node/file.js
# pidfile: /var/run/nodejs.pid
#
@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 / 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 / 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"}
]