duplicates = multiple editions
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
A Classical Introduction to Modern Number Theory,Kenneth IrelandMichael Rosen
| var AWS = require('aws-sdk'); | |
| var http = require('http'); | |
| var httpProxy = require('http-proxy'); | |
| var express = require('express'); | |
| var bodyParser = require('body-parser'); | |
| var stream = require('stream'); | |
| if (process.argv.length != 3) { | |
| console.error('usage: aws-es-proxy <my-cluster-endpoint>'); | |
| process.exit(1); |
| #!/bin/bash | |
| if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
| appify v3.0.1 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
This is what we did to setup a few dashboards at platanus
| #!/usr/bin/env bash | |
| # crashplan-setup.sh | |
| usage () { | |
| echo "Usage: $0 <server> [user]" | |
| exit 255 | |
| } | |
| SERVER="$1" |
| ## convert HTML POST data or HTTP GET query string to JSON | |
| ## get the raw post data from the AWS built-in variable and give it a nicer name | |
| #if ($context.httpMethod == "POST") | |
| #set($rawAPIData = $input.path('$')) | |
| #elseif ($context.httpMethod == "GET") | |
| #set($rawAPIData = $input.params().querystring) | |
| #set($rawAPIData = $rawAPIData.toString()) | |
| #set($rawAPIDataLength = $rawAPIData.length() - 1) | |
| #set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength)) |
| // Q sample by Jeff Cogswell | |
| /*=========== | |
| We want to call these three functions in sequence, one after the other: | |
| First we want to call one, which initiates an ajax call. Once that | |
| ajax call is complete, we want to call two. Once two's ajax call is | |
| complete, we want to call three. | |
| BUT, we don't want to just call our three functions in sequence, as this quick |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |