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()
{
@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 / 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.

#!/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);
@jwieringa
jwieringa / .gitignore
Created October 20, 2015 23:43 — forked from karmi/.gitignore
Example Nginx configurations for Elasticsearch
nginx/
!nginx/.gitkeep
!nginx/logs/.gitkeep
src/
tmp/
@jwieringa
jwieringa / gist:4c35a4fe9676df78afcd
Created October 30, 2015 00:39 — forked from ralph-tice/gist:3d6e5b2076cbc2900aaa
terraform for 3 AZ VPC with NAT instance with autorecovery
###########
# Variables
###########
variable "aws_key_name" {
default = "mykeypair"
}
variable "region" {
default = "eu-west-1"
}
@jwieringa
jwieringa / notes.md
Created December 4, 2015 16:57 — forked from dbouwman/notes.md
Notes from Nodevember 2015

#Nodevember Nodes

Yahuda Keynote

  • basically a ember 101 walk-thru
  • fastboot early 2016 inc client-side re-hydration

Elijah Manor - Code Smells

  • switch statement --> strategy pattern
  • eslint allows custom plugins
  • enable/disabled rules @ file level, or block

Irssi in Mac OS X Notification Center

Mou icon

Overview

This guide will explain how you can make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier.

We will also explain how the process can be automatically started each time you log in to your Mac and ensure the connection to the server is kept alive.

require 'spec_helper'
describe DashboardController do
include Factories::Godzilla
shared_examples "successfully gets the session cards" do
it "is successful" do
get :session_cards