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
var child_process = require('child_process'); | |
var LineInputStream = require('line-input-stream'); | |
var sensorex = LineInputStream(child_process.spawn('./sensorex')); | |
sensorex.setEncoding("utf8"); | |
sensorex.setDelimiter("\n"); | |
sensorex.on('line', function(line) { | |
console.log('New Line: ' + line); |
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
smile | |
:-) | |
frown | |
:-( | |
tongue | |
:-P | |
grin | |
:-D | |
gasp | |
:-O |
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
// http://www.reddit.com/r/Music/wiki/musicsubreddits | |
var musicReddits = $('a').filter(function() { return $(this).text().match(/^\/r\//); }); | |
// array | |
musicReddits.map(function() { return $(this).text(); }).toArray(); | |
// console.log |
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 | |
# Credit to azzid for Spotify version - http://ubuntuforums.org/showthread.php?t=1797848 | |
# Collect DBUS_SESSION_BUS_ADDRESS from running process | |
function set_dbus_adress | |
{ | |
USER=$1 | |
PROCESS=$2 | |
PID=`pgrep -o -u $USER $PROCESS` |
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
$('.tweet').each(function() { | |
if($(this).find('.username').text() == '@GIFs') { | |
var el = $(this).find('.tweet-text'); | |
el.html('<img style="max-width: 100%;" src="' + el.text() + '" alt="' + el.text() + '"/>'); | |
} | |
}); |
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
/** | |
* Is Google Chrome/Chromium? | |
*/ | |
if(window && window.chrome) { | |
// Load the magic | |
} else { | |
// D'oh! | |
} |
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
/** | |
* Module Dependencies | |
*/ | |
var net = require('net'), | |
EventEmitter = require('events').EventEmitter, | |
util = require('util'); | |
/** | |
* SOCKS Server Wrapper for a net stream |
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
sudo apt-get update | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository -y ppa:tomahawk | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install -y libechonest-dev libfftw3-dev libsamplerate0-dev libgsasl7-dev subversion build-essential cmake libtag1c2a libtag1-dev libqt5-dev libqt5-sql-sqlite \ | |
libphonon-dev libboost-dev libboost-thread-dev zlib1g-dev libgnutls-dev libz-dev \ | |
libqjson-dev libattica-dev libqca2-dev libx11-dev pkg-config libqca2-plugin-ossl git-core libspeex-dev # phonon-backend-vlc | |
cd ~ |
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
var http = require('http'); | |
var server = http.createServer(function(req, res) { | |
res.statusCode = 418; | |
res.end('I\'m a teapot'); | |
}); | |
server.listen(process.env.PORT || 3000); |
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
/** | |
* CSS3 Loading with Window (Chrome) | |
*/ | |
body { | |
background-color: #111; | |
} | |
.container { | |
margin: 100px auto; |