How to use:
./wordle.sh
Or try the unlimit mode:
// Receive alerts from the Wormly Webhook Alert channel. | |
// https://www.wormly.com/help/channels/http-rpc | |
require('http').createServer(function (req, res) { | |
var alert = ''; | |
req.on('data', function (chunk) { alert += chunk.toString() }); | |
req.on('end', function () { | |
if (req.headers['content-type'] === 'application/json') { |
/* render HH:mm from a time delta */ | |
function renderMinutesSeconds(ts, now) { | |
var seconds = Math.round(now - ts); | |
var minutes = Math.floor(seconds / 60); | |
seconds = (seconds % 60); | |
return String("0" + minutes).slice(-2) + ":" + String("0" + seconds).slice(-2); | |
} |
# Manually: | |
yum install -y https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_x86_64.rpm | |
# Or in a Chef recipe for extra DevOps karma: | |
execute "mod-spdy-beta" do | |
command "yum install -y https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_x86_64.rpm" | |
not_if "test -f /etc/httpd/conf.d/spdy.conf" | |
end |
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
Accept-Encoding:gzip,deflate,sdch | |
Accept-Language:en-US,en;q=0.8 | |
Connection:keep-alive | |
Cookie:w=000000000000; aid=000000000000 | |
Host:www.wormly.com | |
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 |
for (var f in window) | |
{ | |
try { | |
if (!window[f].toString().match(/native code/)) { | |
console.log(f); | |
} | |
} catch (e) {} | |
} | |
# Choose a host which is configured to use host-specific alert recipients. | |
# You will find the Host ID in small gray text next to its' name on the | |
# Host Overview page (wormly.com/answers/sid/63/topicid/13). | |
# Now, prepare some environment variables: | |
export HOSTID=12345 | |
export WORMLY_API_KEY=<Insert your API key here> | |
# First, check to see if you can read the alert matrix |
/* | |
We have two classes: resultRenderer and dbQuery | |
resultRenderer will ask dbQuery to perform a database query, and asyncronously receives the results | |
*/ | |
function resultRenderer(query) { this._query = query } | |
resultRenderer.prototype = { | |
queryResultsAndRender: function () { | |
this._query.runQueryAsync(this.renderResults.bind(this)); |