Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
This file contains hidden or 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
| import _root_.freemarker.template._ | |
| import circumflex._, freemarker._ | |
| import org.bson._, types._ | |
| import collection.JavaConversions._ | |
| class ExtendedObjectWrapper extends ScalaObjectWrapper { | |
| override def wrap(obj: Any) = obj match { | |
| case null => null |
- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
This file contains hidden or 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
| requests.put('http://localhost:9200/site/', data=json.dumps({ | |
| 'settings': { | |
| 'analysis': { | |
| 'analyzer': { | |
| 'ru': { | |
| 'type': 'custom', | |
| 'tokenizer': 'standard', | |
| "filter": ['lowercase', 'russian_morphology', 'english_morphology', 'ru_stopwords'], | |
| }, | |
| }, |
This file contains hidden or 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 mongoose = require('./../mongoose'); | |
| var Schema = mongoose.Schema; | |
| var sleep = 1000; | |
| var timer; | |
| var db = mongoose.createConnection(); | |
| db.on('error', function () { | |
| // error on startup | |
| console.error('conn error', arguments); |
This file contains hidden or 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
| # Ubuntu upstart file at /etc/init/mongodb.conf | |
| pre-start script | |
| mkdir -p /var/lib/mongodb/ | |
| mkdir -p /var/log/mongodb/ | |
| end script | |
| start on runlevel [2345] | |
| stop on runlevel [06] |
This file contains hidden or 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
| *Add the toolchain/test PPA* | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update | |
| sudo apt-get install g++-4.8 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 | |
| *If you ever want to update symlinks for a future version:* | |
| sudo rm /usr/bin/g++ | |
| sudo ln -s /usr/bin/g++-4.XXX /usr/bin/g++ |
This file contains hidden or 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 request = require('request'); | |
| var fs = require('fs'); | |
| var sox = require('sox'); | |
| var spawn = require('child_process').spawn; | |
| var WATSON_USER = ''; | |
| var WATSON_PASS = ''; | |
| var url = 'https://stream.watsonplatform.net/speech-to-text/api/v1/recognize'; |
This file contains hidden or 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
| # Create background noise profile from mp3 | |
| /usr/bin/sox noise.mp3 -n noiseprof noise.prof | |
| # Remove noise from mp3 using profile | |
| /usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21 | |
| # Remove silence from mp3 | |
| /usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5% | |
| # Remove noise and silence in a single command |
OlderNewer