Skip to content

Instantly share code, notes, and snippets.

<tr class="<<view direction>>"><td><span class="call-title"><$view field="title"/> (<$view field="duration"/>m)</span></td><td><$list filter=[is[current]tags[]] template="$:/themes/pio-theme/TagTemplate" storyview="pop" itemClass="tw-tag-list-item"/></td></tr>
or
<tr class="<$view field='direction'/>"><td><span class="call-title"><$view field="title"/> (<$view field="duration"/>m)</span></td><td><$list filter=[is[current]tags[]] template="$:/themes/pio-theme/TagTemplate" storyview="pop" itemClass="tw-tag-list-item"/></td></tr>
// app.js
$(document).ready(function() {
phoneCollector.getBackups(function(backupOptions) {
backupOptions.forEach(...);
});
});
$('button#go').click(function(){
phoneCollector.convertBackupToPIO(this.value, function() {
alert('done!');
var i = 1;
(function() {
var privateVar = i;
asyncFunc(variable, function() {
// all yo' callback stuff here
console.log(privateVar);
});
})(); // execute function immediately
@jayfresh
jayfresh / gist:4160930
Created November 28, 2012 12:32
TiddlySpaceBackstage.js
/***
|''Name''|TiddlySpaceBackstage|
|''Version''|0.8.0|
|''Description''|Provides a TiddlySpace version of the backstage and a homeLink macro|
|''Status''|@@beta@@|
|''Contributors''|Jon Lister, Jon Robson, Colm Britton|
|''Source''|http://github.com/TiddlySpace/tiddlyspace/raw/master/src/plugins/TiddlySpaceBackstage.js|
|''Requires''|TiddlySpaceConfig ImageMacroPlugin TiddlySpaceViewTypes|
!StyleSheet
.tiddler .error.annotation .button{
@jayfresh
jayfresh / jquery.youtubeUploadsAndFavorites.js
Created November 10, 2012 22:23
Gets the uploads and favorites for a YouTube username
/*
jquery.youtubeUploadsAndFavorites.js
Gets the uploads and favorites for a YouTube username
- removes duplicates
- orders in reverse chronological order
- retries the last 20 of each feed
usage: $(selector).youtubeUploadsAndFavorites();
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error:
error: There was an error while attempting to start the app
error: Error spawning drone
error: Script prematurely exited
error:
error: This type of error is usually a user error.
error: Error output from app:
error:
prompt: Is this ok?: (yes)
info: Creating snapshot 0.0.0-3
info Uploading: [=============================] 99%
info: Updating app nodejs
info: Activating snapshot 0.0.0-3 for nodejs
info: Starting app nodejs
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error:
error: There was an error while attempting to start the app
info: Creating snapshot 0.0.0-2
info Uploading: [=============================] 99%
info: Updating app nodejs
info: Activating snapshot 0.0.0-2 for nodejs
info: Starting app nodejs
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: socket hang up
error: at createHangUpError (http.js:1264:15)
info: Creating snapshot 0.0.0-1
info Uploading: [=========================== ] 94%
info: Updating app nodejs
info: Activating snapshot 0.0.0-1 for nodejs
info: Starting app nodejs
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error:
error: There was an error while attempting to start the app
error: Error spawning drone
{
"name": "nodejs",
"subdomain": "jayfresh.nodejs",
"scripts": {
"start": "server.js"
},
"version": "0.0.0-1",
"engines": {
"node": "0.8.x"
},