Skip to content

Instantly share code, notes, and snippets.

View chiting's full-sized avatar

Chi chiting

  • UK
  • 08:07 (UTC +01:00)
View GitHub Profile
@timblair
timblair / rbenv-update-bundler.sh
Last active August 29, 2015 14:23
Use rbenv? Need to update All The Rubies™ because of Bundler's BUNDLED_WITH change? Then use this script.
#!/bin/bash
eval "$(rbenv init -)"
CURRENT_RUBY=$(rbenv version-name)
LATEST_BUNDLER=$(curl -s https://rubygems.org/api/v1/versions/bundler/latest.json | cut -d'"' -f 4)
echo "Latest Bundler version: $LATEST_BUNDLER"
for RUBY_VERSION in $(rbenv versions --bare); do
rbenv shell "$RUBY_VERSION"
if $(gem list -i bundler); then
@pascalpoitras
pascalpoitras / 1.md
Last active April 10, 2025 14:12
My WeeChat configuration

This configuration is not maintained anymore. You should think twice before using it, Breaking change and security issue will likely eventually happens as any abandonned project.

@mikhailov
mikhailov / 0. nginx_setup.sh
Last active January 21, 2025 08:21
NGINX+SPDY with Unicorn. True Zero-Downtime unless migrations. Best practices.
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
# How to find out where a method comes from.
# Learned this from Dave Thomas while teaching Advanced Ruby Studio
# Makes the case for separating method definitions into
# modules, especially when enhancing built-in classes.
module Perpetrator
def crime
end
end
class Fixnum