One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
A running example of the code from:
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.
location ~ /(?<namespace>[a-z][a-z0-9]*)/(?<package>[a-z][a-z0-9]*) { | |
if ($args = "go-get=1") { | |
add_header Content-Type text/html; | |
return 200 '<meta name="go-import" content="$host/$namespace/$package git https://git.$host/$namespace/$package">'; | |
} | |
} |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# This is how I used it: | |
# $ cat ~/.bash_history | python bash-history-to-zsh-history.py >> ~/.zsh_history | |
import sys | |
import time | |
def main(): |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
# Shutdown postgres | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
# Install 9.4 | |
brew update && brew upgrade postgresql | |
# Make 9.4 DB | |
initdb /usr/local/var/postgres9.4 -E utf8 | |
# Upgrade postgis or the upgrade will fail (if you require postgis) |
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { |
⇐ 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.
CFLAGS = -std=c99 -Wall | |
main : main.o | |
.PHONY : test clean | |
test : main | |
./$^ "*regex*" "*vtable*" < main.c | |
clean : |
// This script is for Jenkins' Groovy console, and sets a timeout | |
// strategy for any job which doesn't have one. | |
// Based on http://janmaterne.wordpress.com/2010/07/11/how-to-check-if-all-hudson-jobs-have-a-timeout/ | |
// Updated and modified by Sean Flanigan. | |
import hudson.model.* | |
String describe(strat) { | |
if (strat instanceof hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy) { | |
return "Elastic(${strat.timeoutPercentage}, ${strat.numberOfBuilds}, ${strat.timeoutMinutesElasticDefault})" |