Skip to content

Instantly share code, notes, and snippets.

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:
@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();
@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{
var i = 1;
(function() {
var privateVar = i;
asyncFunc(variable, function() {
// all yo' callback stuff here
console.log(privateVar);
});
})(); // execute function immediately
// app.js
$(document).ready(function() {
phoneCollector.getBackups(function(backupOptions) {
backupOptions.forEach(...);
});
});
$('button#go').click(function(){
phoneCollector.convertBackupToPIO(this.value, function() {
alert('done!');
<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>
@jayfresh
jayfresh / gist:f8e61419c3c56e1a7448
Created September 4, 2014 18:31
modal widgets - how to close them
/*
This is a paraphrased version of some code I'm working on.
What I'm trying to achieve is:
- open a modal with a custom footer (see 'footer' property of the addTiddler call)
- the footer contains a $button widget with a custom message
- listen for the custom message on $tw.rootWidget and update localstorage to note the button has been clicked
- then close the modal and show another div
I've got as far as the last step. The event handler on $tw.rootWidget doesn't give me any
@jayfresh
jayfresh / gist:22ec848f7aa90aaf461f
Created October 27, 2014 12:40
acceptance tests
Acceptance tests - 12715 ms
Organisations and their properties - 74 ms
Organisations have access to only their own properties - 74 ms
Inviting Users to Organisations - 176 ms
should send them a token in an email - 73 ms
should send long, non-guessable tokens - 46 ms
following the token link and setting up an account should put the User in the Organisation - 57 ms
/*\
title: $:/plugins/jayfresh/tiddler-server/tiddler-server.js
type: application/javascript
module-type: command
A server command to serve tiddlers as HTML as well as the main server API
\*/
(function(){
<strong>T: 020 7655 4820</strong>
<a href="http://sweetspot.com/"><strong>sweetspot.com</strong></a>
<a href="https://www.facebook.com/sweetspothomes?fref=ts"><strong>Facebook/sweetpothomes</strong></a>
<a href="http://www.twitter.com/sweetspothomes"><strong>@sweetspothomes</strong></a>
<a href="http://www.pinterest.com/sweetspothome/"><strong>Pinterest</strong></a>