Skip to content

Instantly share code, notes, and snippets.

CHRUBY_VERSION="0.3.8"
RUBIES=()
for dir in "$PREFIX/opt/rubies" "$HOME/.rubies"; do
[[ -d "$dir" && -n "$(ls -A "$dir")" ]] && RUBIES+=("$dir"/*)
done
unset dir
function chruby_reset()
{
HTTP/1.1 202 Accepted
Access-Control-Allow-Credentials: false
Access-Control-Allow-Headers: Authorization, Content-Type, X-Requested-With
Access-Control-Allow-Methods: POST, GET, PUT, DELETE, PATCH, OPTIONS, HEAD
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 86400
Cache-Control: no-cache
Content-Type: text/csv; charset=utf-8
Date: Mon, 01 Dec 2014 12:25:19 GMT
Server: nginx/1.4.6 (Ubuntu)
@jwieringa
jwieringa / nginx.conf
Last active August 29, 2015 14:18 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jwieringa
jwieringa / index.html
Last active August 29, 2015 14:26
US_State_Boundaries
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href=
"http://js.arcgis.com/3.14/esri/css/esri.css">
<title>Webmap created with Mundi</title>
<style>
@jwieringa
jwieringa / GitHub protocol comparison.md
Last active September 2, 2015 17:05
A comparison of protocols offered by GitHub (for #git on Freenode).

Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.

Protocols to choose from when cloning:

plain Git, aka git://github.com/

  • Does not add security beyond what Git itself provides. The server is not verified.

    If you clone a repository over git://, you should check if the latest commit's hash is correct.

provider "aws" {
region = "${var.aws_region}"
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
}
variable "aws_region" {
default = "us-east-1"
}
[20:15:07] jwieringa: https://github.com/esirola/rsyslog/blob/master/template.c#L78
[20:15:36] jwieringa: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html/System_Administrators_Guide/s1-configuring_rsyslog_on_a_logging_server.html
[20:21:19] jwieringa: http://rsyslog-users.1305293.n2.nabble.com/Insecure-configurations-using-Rsyslog-property-replacer-td7583192.html
[20:23:44] jwieringa: https://lists.fedoraproject.org/archives/list/docs-commits@lists.fedoraproject.org/thread/UG5W7WRUCGAVJHOKPLQZ7IVCDLL36IY2/
There really is no example on the internet...?
#!/bin/bash
usage ()
{
cat <<UsageHERE
boot2docker-fwd -- Helper function to quickly manage port forwards between the boot2docker-vm and the host
Usage: boot2docker-fwd [ -n RULE_NAME ] [ -h HOST_PORT ] [ -p {tcp|udp} ] [ -i HOST_IP ] GUEST_PORT
or boot2docker-fwd -d RULE_NAME
or boot2docker-fwd -l
or boot2docker-fwd -A
@jwieringa
jwieringa / fork.js
Created September 25, 2015 21:28 — forked from kpettijohn/fork.js
nodejs fork
const
fs = require('fs'),
child_process = require('child_process');
var workers = [];
for(var i=0; i<5; i++) {
var worker = child_process.fork("lib/ExportWorker.js", [i]);
workers.push(worker);
console.log('Worker PID: ' + worker.pid);