Skip to content

Instantly share code, notes, and snippets.

View mark-ellul's full-sized avatar

Mark Ellul mark-ellul

View GitHub Profile
class UseUtf8mb4Characterset < ActiveRecord::Migration
def up
# The migration has been done following:
# - http://mathiasbynens.be/notes/mysql-utf8mb4#utf8-to-utf8mb4
# - http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-upgrading.html
database = Rails.configuration.database_configuration[Rails.env]["database"]
# Stop checking foreign keys
execute "SET foreign_key_checks = 0"
@v1nc3ntlaw
v1nc3ntlaw / rbenv-install-system-wide.sh
Last active July 26, 2022 01:08
rbenv install ruby 1.9.3-p448 on Debian 6 Squeeze
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev