Install the required packages
brew install ncmpcpp mpd mpcMake the.mpd directory in your home directory
mkdir ~/.mpd| var AWS = require('aws-sdk'); | |
| var sqs = new AWS.SQS(); | |
| const queueUrl = ''; | |
| async function sendMessages(messages) { | |
| for (var i = 0; i < messages.length;) { | |
| var params = { | |
| QueueUrl: queueUrl, | |
| Entries: [] | |
| }; |
Install the required packages
brew install ncmpcpp mpd mpcMake the.mpd directory in your home directory
mkdir ~/.mpd| var resultPromises = Object.keys(queries).map(function(){ | |
| var value = queries[key]; | |
| return populateTables(value); | |
| }); | |
| Promise.all(resultPromises).then(runThisAfterAllFinish); |
Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
| created_utc,score,domain,id,title,author,ups,downs,num_comments,permalink,selftext,link_flair_text,over_18,thumbnail,subreddit_id,edited,link_flair_css_class,author_flair_css_class,is_self,name,url,distinguished | |
| 1315403643.0,462,cracked.com,k7kzm,Writer of Cracked.com mentions this subreddit in their article,penguinsmut,493,31,47,http://www.reddit.com/r/controllablewebcams/comments/k7kzm/writer_of_crackedcom_mentions_this_subreddit_in/,,,False,http://thumbs.reddit.com/t3_k7kzm.png,t5_2qt74,False,,,False,t3_k7kzm,http://www.cracked.com/article_19412_8-things-you-wont-believe-can-be-hacked.html, | |
| 1339618071.0,159,209.121.28.211,v0dh3,Now we just wait for kinky elevator sex.,Brudus,173,14,97,http://www.reddit.com/r/controllablewebcams/comments/v0dh3/now_we_just_wait_for_kinky_elevator_sex/,,,False,default,t5_2qt74,False,,,False,t3_v0dh3,http://209.121.28.211/anony/mjpg.cgi, | |
| 1349006496.0,148,cryptogasm.com,10phl7,"I created a basic web viewer for a load of webcams I discovered (1,392 and counting).",Rsaesha,163,1 |
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {number} a random floating point number | |
| */ | |
| function getRandomFloat(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } |
Update: I made this a proper blog post
Start your rethinkdb instance with this flag:
--bind all (or bind=all in the configuration file for your instance)
Block external access to the web UI with these two commands:
sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP
sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT
Install nginx:
sudo apt-get install nginx
| # | |
| # Example usage: | |
| # | |
| # require 'rubygems' | |
| # require 'date' | |
| # require 'socket' | |
| # require 'celluloid' | |
| # require 'nntp_connection' | |
| # | |
| # nntp = NNTPConnection.new('news.supernews.com', 119, 'username', 'password') |
| function findKey(obj, value){ | |
| var key; | |
| _.each(_.keys(obj), function(k){ | |
| var v = obj[k]; | |
| if (v === value){ | |
| key = k; | |
| } | |
| }); |