Skip to content

Instantly share code, notes, and snippets.

@denniskong
denniskong / create_x509_certs.md
Created January 9, 2024 14:49 — forked from dasniko/create_x509_certs.md
Creating self signed tls certificates with self-signed root CA
@denniskong
denniskong / ree-1.8.7-2011.03
Created November 19, 2012 15:41 — forked from fgrehm/ree-1.8.7-2011.03
ruby-build REE definitions for Ubuntu 12.04
build_package_patched() {
# These three patches are included when RVM builds REE
cd source
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/tcmalloc.patch'
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/stdout-rouge-fix.patch'
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/no_sslv2.diff'
patch -p1 < tcmalloc.patch
patch -p1 < stdout-rouge-fix.patch
patch -p1 < no_sslv2.diff
cd ..
@denniskong
denniskong / denniskong.zsh-theme
Created October 31, 2012 15:23
oh my zsh theme
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local rvm_ruby=''
if which rvm-prompt &> /dev/null; then
rvm_ruby='%{$fg_bold[blue]%}rmv:(%{$fg[red]%}$(rvm-prompt i v g)%{$fg_bold[blue]%})%{$reset_color%} '
else
if which rbenv &> /dev/null; then
rvm_ruby='%{$fg_bold[blue]%}rbenv:(%{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//")%{$fg_bold[blue]%})%{$reset_color%} '
fi
fi
@denniskong
denniskong / .zshrc
Created October 31, 2012 15:22
zsh config file
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="denniskong"
# Example aliases
@denniskong
denniskong / gist:3514253
Created August 29, 2012 15:20
pallet node-spec vpc subnet
(pallet.core/node-spec
:image {:os-family :ubuntu
:os-version-matches "12.04"
:image-id "eu-west-1/ami-db595faf"},
:location {:location-id "eu-west-1"}
@denniskong
denniskong / check_memcache.rb
Created November 1, 2009 12:32
Nagios plugin to check memcached written in ruby
#!/usr/bin/env ruby
# check_memcached.rb ko.de.r.de@googlemail.com 20091101 v0.1
# Copyright 2009, Dennis Kong
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#