Skip to content

Instantly share code, notes, and snippets.

View ngpestelos's full-sized avatar

Nestor G Pestelos Jr ngpestelos

View GitHub Profile
# How Clearance / Hoptoad does it
module Clearance
class << self
attr_accessor :configuration
end
def self.configure
self.configuration ||= Configuration.new
yield(configuration)
end

Setting up Ruby, Rails, Nginx, Passenger, PostgreSQL 9 on Ubuntu 12.04 LTS for Windows Azure

Last updated: 12/31/2013

Fix the locale issue

  • Edit /etc/default/locale as sudo.
  • Append LC_ALL="en_US.UTF-8" at the end of the file, save and quit.
  • sudo locale-gen en_US en_US.UTF-8
  • sudo dpkg-reconfigure locales

Install the necessary packages to install rbenv and build Ruby

# Use 'docker.io' if using the official packages on Ubuntu 14.04+
alias dip="docker inspect --format '{{ .NetworkSettings.IPAddress }}'"
drm() { docker rm ; }
dri() { docker rmi ; }
alias dkd="docker run -d -P"
alias dki="docker run -t -i -P"
alias docker_rmi_all='docker rmi $(docker images|tail -n +2|awk '\''{print $1":"$2}'\'')'
#####
#!/bin/bash
# File: deis-backup.sh
# Author: Ian Blenke
# License: Apache License, Version 2.0
#
# Note: This script is meant to be run under CoreOS "toolbox", as it uses the /media mount and talks locally to etcd to obtain Deis ceph credentials.
# Error out whenever something returns a non-zero errno
set -eo pipefail