Skip to content

Instantly share code, notes, and snippets.

@mitfik
mitfik / ruby_csr_example.rb
Created February 27, 2012 10:13
Ruby example of CSR with openssl
require 'openssl'
def gen_key(name)
key = OpenSSL::PKey::RSA.new 1048
file = File.new(name, "w")
file.write(key)
file.close
end
def get_key(name)
@blowmage
blowmage / .profile
Last active August 29, 2015 13:55
chruby and ohmygems together at last
# my preferred prompt - ☣ [pairwithme:rails4] $
PS1='\[\e[1;31m\]☣ [\W$(if [ -n "$OMG_NAME" ]; then eval "echo :$OMG_NAME"; fi)] $\[\e[0m\] '
# chruby configuration
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
# set default ruby
chruby 2.1
@micgo
micgo / Gemfile
Created February 11, 2014 22:00
Test Kitchen, Guard, Foodcritic, ChefSpec
source 'https://rubygems.org'
gem 'berkshelf', '~> 2.0'
group :development do
gem 'ruby_gntp'
gem 'test-kitchen'
gem 'kitchen-vagrant'
gem 'guard'
gem 'guard-kitchen'
s = status --short --branch --ignore-submodules=untracked
find = log --pretty=\"format:%Cgreen%H\n%s\n\n%b\" --name-status --grep
amend = commit --amend --no-edit
undo = reset HEAD~
upload = "!git push rakyll $(git rev-parse --abbrev-ref HEAD)"
prune = "!git co master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
delete = branch -D
pr = "!git fetch origin pull/$1/head:pr$1"
sync = "!git pull -q -r origin master"
@developer-guy
developer-guy / main.go
Last active April 14, 2021 21:50
Provision a Local Kubernetes Cluster Using KinD with Go
package main
import (
"os"
"os/signal"
"syscall"
"github.com/sirupsen/logrus"
"sigs.k8s.io/kind/pkg/cluster"
"sigs.k8s.io/kind/pkg/log"