Skip to content

Instantly share code, notes, and snippets.

View Marak's full-sized avatar

Marak

View GitHub Profile
// Only instantiate once and append the calls in your loop
// Because XHR responses pop out of the stack, all of the
// requests will be linked and sent before the first can
// return.
// Also, when passing the settings object as a config,
// the callback is inside the object. The signatures for
// sexy methods are (url, callback) or (settings)
// Can configure globally for the Sexy instance
var users = "zaqintosh b8ef4abcac2fcdee3c5dae3fb114d6ce zaqr 1d67c1c82b41579960c1da9bbc77b0c7 zaquaz 0b0ae8cab282a9bd6cd00238097dad61 zaqwery 3dee06be0b98ab1d031e8cf317e3e268 zaqxsw 4bb4f407bf57dca832443100e8a3b1db Zara 5a58d822b550f3b629516e05c4db3739 Zarabadoo b3c99e4eeb5630725b04357f1ea50d81 zaraban 14fd42aa2d75d6da50af48466718af3d zarah 3396f68593bd6291bf3c36b3de9d8464 Zaralus 3ba1c8745f20dab9f38ae34d9a843749 Zaran 129e1b9c2712df9ddf54911bb6208996 zarate 9ffffa3c750ef8fb1f7514f7d0d98dfd zarathud 174db1668c56f23c22c80605c3ee78cf zarathus efef7a1ce696cbcfa94434e5c647e894 zaratustra 41eb7f849576cb11ef553a11bd061f5b zarawesome f6d29e05b798805e15b22ce0e9fd548d zarax 86196ea56eeec701fc2e6d2f12512d6b zarboy d35d26e7e3e87276f08b119aa08c042a zarch 1ea068f2fa4197f262f847b0d772e17d zarchanalin fc22abc52a54c293b9e836bc5a1400f2 zard1989 abcfc316060e0f2a8a2fb6441c9c6d02 Zardilann f15aa02e07cd97075b1f4326fb9b90e0 zardonkan 5efae67b27fcd50fc5959d035f55a47a zardoz 551803890b33853502af30da4ce46d0b zardozjones cf2b272c73063
$('#addSpeaker').click(function(e){
// i think we could use clone() here instead of trying having the HTML frag inside a string
$('#speakersTable').append('<tr><td><table class = "speakerItem"><tr>\
<td>speaker name</td>\
<td><input type="text" name="newsletter[speakers][][name]" id="newsletter_speakers_name"/></td>\
</tr>\
<tr>\
<td>speaker description</td>\
var promise = fs.readFile(filename, encoding);
promise.addCallback(function (data) {
body = data;
headers = [ [ "Content-Type" , content_type ]
, [ "Content-Length" , body.length ]
];
if (!DEBUG)
headers.push(["Cache-Control", "public"]);
httpServer = http.createServer(function(request, response) {
request.body = '';
request.addListener('data', function(chunk) {
request.body = request.body + chunk;
});
request.addListener('end', function() {
hookIO.emit('HttpRequest', request, response);
});
});
@Marak
Marak / github config
Created April 2, 2010 02:40
github config setup
$ git config --global github.user "Marak"
$ git config --global user.name "Marak Squires"
$ git config --global user.email "[email protected]"
var F = function () {};
F.name // ''
F.name = "foo";
F.name // ''
function F(){}
var blah = new F();
tests.createHookWithActions = {"testGroup":{}};
tests.test_create_hook_url_with_http_action_as_id = new hookIO.apiCall({
"method":"createHook",
"params": new Hook( {
'id' : new Date().getTime(),
'type': 'http',
'config': {
'path': 'TestCustomURL' + new Date().getTime(),
'actions' : [12,15,16]
[Marak@Maraks-MacBook-Pro .../hook.io/hookio/lib/proto]$ git status
# Not currently on any branch.
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: lib/proto.js
#
no changes added to commit (use "git add" and/or "git commit -a")
[Marak@Maraks-MacBook-Pro .../hook.io/hookio/lib/proto]$ git commit -a -m "made a change to test the hook.io git submodule workflow"
this.headers = {
'Accept': '*/*',
'Host': 'api.twitter.com',
'User-Agent': 'Twitscript Node.js Client',
'headers' : {}
};