Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.assetUpload.events( | |
'drop #asset-upload-dropzone': (e) -> | |
e.stop() | |
$(e.target).removeClass 'dropzone-hover' | |
new AssetUpload(e) | |
'dragenter #asset-upload-dropzone': (e) -> | |
e.stop() | |
$(e.target).addClass 'dropzone-hover' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* queue.js allow you to run async callbacks in serial. | |
*/ | |
var Queue = { | |
callbacks: [], | |
idle: true, | |
// Queue.add(function() {}); | |
// Used to add a new function to the callback queue |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
-
Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.
-
Reset PS3 controller by inserting paperclip into pinhole near L2 button.
-
Connect PS3 controller to Mac with USB cable.
-
Enable Bluetooth.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# @jsdavo 6th July 2012 | |
# Derived mainly from https://onabai.wordpress.com/2012/05/10/installing-couchdb-1-2-in-ubuntu-12-04/ | |
# For Ubuntu 12 | |
# Get some 300MB of dependencies | |
sudo apt-get install automake autoconf libtool subversion-tools help2man | |
sudo apt-get install build-essential erlang libicu-dev | |
sudo apt-get install checkinstall libmozjs-dev wget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findPerpendicularDistance(point, line) { | |
var pointX = point[0], | |
pointY = point[1], | |
lineStart = { | |
x: line[0][0], | |
y: line[0][1] | |
}, | |
lineEnd = { | |
x: line[1][0], | |
y: line[1][1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
module.$localStorage[key] = serializer(value); | |
} catch(e) { | |
if(e.name === 'QUOTA_EXCEEDED_ERR') { | |
// reset to make space | |
module.reset(); | |
module.$localStorage[key] = serializer(value); | |
} else { | |
module.localStorageAvailable = false; | |
$log.error("Local storage write failure - " + e); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(a){var b=parseInt(a.replace(/[\s|,]/g,""),10);alert(isNaN(b)?'"'+a+"\" doesn't look like a UNIX timestamp.":'"'+a+'" is\n'+new Date(b*(b>1e12?1:1e3)));})(window.getSelection().toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See http://bildr.org/2011/02/mlx90614-arduino/ for i2c library and instructions | |
// You must download the "twimaster.cpp" and "i2cmaster.h" files, and place them in a folder called "I2Cmaster". This must be placed in a folder called "libraries" which in turn should be placed in your Sketchbook folder (see Arduino's Preferences menu item to see where this is on your machine.). | |
// Typically, once you install these files, you must relaunch Arduino. | |
// The extra files are included in this Gist, as well as attached to the page http://publiclaboratory.org/tool/thermal-camera | |
#include <i2cmaster.h> | |
#include "Wire.h" | |
//#include "BlinkM_funcs.h" |