Skip to content

Instantly share code, notes, and snippets.

View mrrooijen's full-sized avatar

Michael van Rooijen mrrooijen

View GitHub Profile
Vagrant::Config.run do |config|
config.vm.box = "lucid32"
config.vm.customize ["modifyvm", :id, "--memory", 2048]
config.vm.network :hostonly, "192.168.33.10"
config.vm.forward_port 8080, 5080
config.vm.forward_port 8443, 5443
end
@mrrooijen
mrrooijen / ulimitconfs.sh
Created July 20, 2012 01:42
ulimit hell.
# /etc/security/limits.conf
root - nofile 65000
deployer - nofile 65000
# Ubuntu upstart file at /etc/init/mongodb.conf
start on runlevel [2345]
stop on runlevel [016]
respawn
script
@mrrooijen
mrrooijen / lang.sh
Created July 21, 2012 15:23
Before attempting to send an email, export LANG=en_US.UTF-8 to avoid stupid ASCII issues.
export LANG=en_US.UTF-8
@mrrooijen
mrrooijen / install.sh
Created July 21, 2012 20:13
[Ubuntu 10.04 (Lucid)] Working GitlabHQ script for skipping the first 3 steps of the the installation guide at https://github.com/gitlabhq/gitlabhq/blob/stable/doc/installation.md
sudo apt-get update
sudo apt-get upgrade -y
apt-get install -y \
git-core wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 \
libsqlite3-dev openssl libcurl4-openssl-dev libc6-dev libssl-dev libmysql++-dev \
make build-essential zlib1g zlib1g-dev libicu-dev redis-server openssh-server \
python-dev python-pip libyaml-dev libreadline6 libreadline6-dev autoconf \
ncurses-dev automake libtool bison subversion
@mrrooijen
mrrooijen / batman-filters.coffee
Created July 31, 2012 18:17
Useful Batman.js Filters.
Batman.mixin Batman.Filters,
isCreating: (model) -> model?.get("lifecycle.state") == "creating"
isSaving: (model) -> model?.get("lifecycle.state") == "saving"
isDestroying: (model) -> model?.get("lifecycle.state") == "destroying"
isPersisting: (model) -> model?.get("lifecycle.state") in ["saving", "creating"]
isUndefined: (input) -> input == undefined
isNull: (input) -> input == null
isBlank: (input) -> input in [undefined, null, ""]
Mail = Ember.Application.create();
// Let's pretend that Javascript can handle mutliline strings nicely:
Mail.ApplicationView = Ember.View.extend({
template: Ember.Handlebars.compile('
<!-- this gets replaced with content based on state when
connectOutlet is called on ApplicationController -->
{{outlet}}
')
Mail = Ember.Application.create();
// Let's pretend that Javascript can handle mutliline strings nicely:
Mail.ApplicationView = Ember.View.extend({
template: Ember.Handlebars.compile('
<!-- this gets replaced with content based on state when
connectOutlet is called on ApplicationController -->
{{outlet}}
@mrrooijen
mrrooijen / README.md
Created August 15, 2012 01:30
Heroku SSL Endpoint, RapidSSL

Heroku SSL Endpoint

Assumptions:

  • You want to enable SSL for your domain.
  • You want to go with RapidSSL.
  • Your domain name is www.domain.com during this example.
  • You want to encrypt requests for a single domain (no wildcard)
  • You want to apply this certificate to Heroku's SSL Endpoint
@mrrooijen
mrrooijen / README.md
Last active February 11, 2023 19:44
Setting up XEN on a Hetzner Dedicated Server

Setting up XEN on a Hetzner Dedicated Server

Author: Michael van Rooijen (@mrrooijen)

DISCLAIMER: I am a programmer, not a sysadmin in my day-to-day life. I provide this guide simply as a self-reference, and as a way to contribute to the community of developers. The main motivation for writing this guide is because of the lack of properly written guides/tutorials. They were either out-dated, inaccurate, in a non-English language or simply too vague to understand (at least for me, as a programmer and not a sysadmin).

I hope this guide helps getting you up and running with your own collection of VPS's on your own Dedicated Server over at Hetzner.de.

Requirements:

@mrrooijen
mrrooijen / README.md
Created October 16, 2012 22:19
Ruby Environment On Mountain Lion

Ruby Environment On Mountain Lion

A quick and easy step-by-step guide to get your Ruby environment up and running again after a fresh install of Mountain Lion. I messed up my installations a few times and figured I'd just put out a Gist once and for all to get this sucker working in one go.

The Steps

First go ahead and install either XCode to get ahold of the Command Line Tools. Or, if you prefer not to install XCode, simply download the latest version directly. This only requires you to provide your Apple ID and password to sign in. You do not need a developers license.

  1. Download the Command Line Tools
  • Or install them through XCode via the preference panel