A lightweight node port of websocketd, originally written in go.
node-websocketd --port=8080 ./count.sh
A lightweight node port of websocketd, originally written in go.
node-websocketd --port=8080 ./count.sh
apply plugin: "java" | |
apply plugin: "eclipse" | |
apply plugin: "idea" | |
group = "com.mycompany.hadoopproject" | |
version = "1.0" | |
repositories { | |
// Standard Maven | |
mavenCentral() |
package spark.examples | |
import org.apache.spark._ | |
import org.apache.spark.SparkContext._ | |
import org.json4s.jackson.JsonMethods | |
import org.json4s.jackson.JsonMethods._ | |
import org.json4s.JsonAST._ | |
object HDFSDeleteExample { |
/** | |
* Required Variables. | |
*/ | |
variable "name" {} | |
variable "port" {} | |
variable "elb_security_group" {} | |
variable "elb_subnets" {} |
import com.amazonaws.services.s3._, model._ | |
import com.amazonaws.auth.BasicAWSCredentials | |
val request = new ListObjectsRequest() | |
request.setBucketName(bucket) | |
request.setPrefix(prefix) | |
request.setMaxKeys(pageLength) | |
def s3 = new AmazonS3Client(new BasicAWSCredentials(key, secret)) | |
val objs = s3.listObjects(request) // Note that this method returns truncated data if longer than the "pageLength" above. You might need to deal with that. |
⇐ back to the gist-blog at jrw.fi
Backing stuff up is a bit of a hassle, to set up and to maintain. While full-blown backup suites such as duplicity or CrashPlan will do all kinds of clever things for you (and I'd recommend either for more complex setups), sometimes you just want to put that daily database dump somewhere off-site and be done with it. This is what I've done, with an Amazon S3 bucket and curl
. Hold onto your hats, there's some Bucket Policy acrobatics ahead.
There's also a tl;dr at the very end if you just want the delicious copy-pasta.
#!/usr/bin/env bash | |
set -euo pipefail && cd "$(dirname "${BASH_SOURCE[0]}")/.." | |
# hit - git-like command dispatcher. Who needs Makefiles? | |
# | |
# Create a directory `bin/` at the top level of your project | |
# directory (the one committed to git). Copy this file into | |
# that folder, call it `hit` and make it executable. | |
# | |
# Type `bin/hit NAME` to run a subcommand called NAME. Subcommands |