This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require File.expand_path('../config/environment', __FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $ | |
# This is the ssh client system-wide configuration file. See | |
# ssh_config(5) for more information. This file provides defaults for | |
# users, and the values can be changed in per-user configuration files | |
# or on the command line. | |
# Configuration data is parsed as follows: | |
# 1. command line options | |
# 2. user-specific file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h = {a: 1, b: 2, c:3} | |
# => {:a=>1, :b=>2, :c=>3} | |
a = h.flatten | |
# => [:a, 1, :b, 2, :c, 3] | |
a.reverse! | |
# => [3, :c, 2, :b, 1, :a] | |
a.shift(2) | |
# => [3, :c] | |
a | |
# => [2, :b, 1, :a] |