openvpn learn-address script to manage a hosts-like file
- intended to allow dnsmasq to resolve openvpn clients
- written for openwrt (busybox), but should work most anywhere
# Get rid of color codes | |
mutate { | |
gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""] | |
} |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
// MultiExporter.jsx | |
// Version 0.1 | |
// Version 0.2 Adds PNG and EPS exports | |
// Version 0.3 Adds support for exporting at different resolutions | |
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize | |
// Version 0.5 Fixed cropping issues | |
// Version 0.6 Added inner padding mode to prevent circular bounds clipping | |
// | |
// Copyright 2013 Tom Byrne | |
// Comments or suggestions to tom@tbyrne.org |
This describes deploying and running OpenShift Origin in Amazon Web Services.
This is based upon the code and installer on 2014-02-26 so YMMV.
We will be using a VPC for deployment in us-east-1 and Route53 for DNS. I will leave the VPC setup as an exercise for the reader.
A Dashing widget for displaying the number of current visitors (in real time) to your website, as reported by Google Analytics.
This widget is a fork of https://gist.github.com/mtowers/5986576
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)import Darwin | |
extension Array { | |
func shuffle() -> Array { | |
// this will sometimes crash (submitted bug #17127524) | |
self.sort { _,_ in arc4random_uniform(2) == 1 } | |
return self | |
} | |
mutating func removeAtIndexes( indexes:Int... ) { | |
indexes.sort(>) |
Alternate title: Cross compiling Windows/Darwin/Linux amd64/386/arm all from linux
After fumbling around trying to figure out the go toolchain and cross compilation configuration, I ran across the wiki page on Go's homepage. It's super helpful, and worked out of the box. I'm including the necessary scripts here in case they get changed or lost, and we can help Google find it (since it's the first real source I've found that "Just Worked"). http://code.google.com/p/go-wiki/wiki/WindowsCrossCompiling