Handy for when working on single-page apps
npm install -g server-here
here
(if you're in a folder with files you want to serve)
here --dir [directory to load files from] --port [port to use]
#! /bin/bash | |
if [ $# -eq 0 ]; then | |
echo "You have to specify a module index" | |
exit 128 | |
fi | |
pactl unload-module $1 |
CMU Sphinx | |
http://cmusphinx.sourceforge.net/wiki/tutorialam | |
http://www.speech.cs.cmu.edu/sphinxman/scriptman1.html | |
PocketSphinx | |
http://ghatage.com/2012/12/voice-to-text-in-linux-using-pocketsphinx/ | |
http://ghatage.com/2012/12/make-pocketsphinx-recognize-new-words/ | |
git tag -d TagName && git push origin :refs/tags/TagName |
##Chai Expect
##Language Chains
.filter("timeago", function () { | |
//time: the time | |
//local: compared to what time? default: now | |
//raw: wheter you want in a format of "5 minutes ago", or "5 minutes" | |
return function (time, local, raw) { | |
if (!time) return "never"; | |
if (!local) { | |
(local = Date.now()) | |
} |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
# A list of available STUN server. | |
stun.l.google.com:19302 | |
stun1.l.google.com:19302 | |
stun2.l.google.com:19302 | |
stun3.l.google.com:19302 | |
stun4.l.google.com:19302 | |
stun01.sipphone.com | |
stun.ekiga.net |
// set-up a connection between the client and the server | |
var socket = io.connect(); | |
// let's assume that the client page, once rendered, knows what room it wants to join | |
var room = "abc123"; | |
socket.on('connect', function() { | |
// Connected, let's sign-up for to receive messages for this room | |
socket.emit('room', room); | |
}); |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |