I hereby claim:
- I am hidinginabunker on github.
- I am gabrielherrera (https://keybase.io/gabrielherrera) on keybase.
- I have a public key ASDDNqyW7WERXuAiGW5tj8wHrsw1dFFlutwS13rGSUlWFgo
To claim this, I am signing this object:
| #!/bin/sh -e | |
| # | |
| # rc.local | |
| # | |
| # This script is executed at the end of each multiuser runlevel. | |
| # Make sure that the script will "exit 0" on success or any other | |
| # value on error. | |
| # | |
| # In order to enable or disable this script just change the execution | |
| # bits. |
| // initialize some wiggle room to add some stank | |
| var wiggle = [0.0, 0.2, 0.3, 0.4, 0.5].choose; | |
| // select some base tone and add some wiggle room so we get some more interesting pure tones | |
| var baseTone = [ | |
| 440*2+wiggle, | |
| 440*3+wiggle, | |
| 440*4+wiggle | |
| ].choose; |
| const redis = require('redis') | |
| const client = redis.createClient() | |
| // will retry running a function until a lock is freed and it can run it | |
| function retryUntilUnlocked(lock, func, seconds) { | |
| client.get(lock, function (err, result) { | |
| // while there is still a lock, keep re-trying every x seconds | |
| if(result === 'true') { | |
| setTimeout( () => { |
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * Stores recently viewed urls to local storage along with their view times | |
| * | |
| * @param {String} key - the localStorage key where the list is stored | |
| * @param {String} url - the location of the page that was viewed | |
| * @param {Object} json - arbitrary json blob associated with a url | |
| * @param {Integer} limit - the max number of urls to save | |
| */ | |
| function addToRecentlyViewed (key, url, json, limit) { |
| var app = require('http').createServer(handler) | |
| , io = require('socket.io').listen(app) | |
| , fs = require('fs') | |
| , Redis = require('redis') | |
| , redis1 = Redis.createClient() | |
| , redis2 = Redis.createClient() | |
| ; | |
| redis1.on('error', function(err) { |
| var intervalTicks = 100; | |
| var redValue = 1; | |
| var greenValue = 1; | |
| var blueValue = 1; | |
| var colorChangeMagnitude = 1.01; | |
| var backgroundColor = "rgb("+redValue+","+greenValue+","+blueValue+")"; | |
| var redFlag = "down"; | |
| var greenFlag = "up"; | |
| var blueFlag; "up"; |
| app = Flask(__name__) | |
| @app.route("/", methods=['GET']) | |
| def helloworld(): | |
| return "PostReceive Catch Active" | |
| @app.route("/", methods=['POST']) | |
| def hello(): | |
| payloadString = request.form['payload'] |
| #!/usr/bin/env node | |
| var | |
| mu = require('Mu'), | |
| fs = require('fs'); | |
| var | |
| usage = '' | |
| + '\n' | |
| + ' Usage: mustache.js [context] [template]\n' |