http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
--- | |
include: | |
- ".solargraph_definitions.rb" | |
- "app/**/*.rb" | |
- "config/**/*.rb" | |
- "lib/**/*.rb" | |
exclude: | |
- test/**/* | |
- vendor/**/* | |
- ".bundle/**/*" |
====== | |
Videos | |
====== | |
DevOps | |
What is DevOps? by Rackspace - Really great introduction to DevOps | |
https://www.youtube.com/watch?v=_I94-tJlovg | |
Sanjeev Sharma series on DevOps (great repetition to really get the DevOps concept) |
$! --- The exception information message set by 'raise'. | |
$@ --- Array of backtrace of the last exception thrown. | |
$& --- The string matched by the last successful match. | |
$` --- The string to the left of the last successful match. | |
$' --- The string to the right of the last successful match. | |
$+ --- The highest group matched by the last successful match. | |
$1 --- The Nth group of the last successful match. May be > 1. | |
$~ --- The information about the last match in the current scope. | |
$= --- The flag for case insensitive, nil by default. | |
$/ --- The input record separator, newline by default. |
require "net/http" | |
def start_server | |
# Remove the X to enable the parameters for tuning. | |
# These are the default values as of Ruby 2.2.0. | |
@child = spawn(<<-EOC.split.join(" ")) | |
XRUBY_GC_HEAP_FREE_SLOTS=4096 | |
XRUBY_GC_HEAP_INIT_SLOTS=10000 | |
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8 | |
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0 |
# Natively, Enumerators get JSONized like "#<Enumerator::Lazy:0x007f8714807080>", or they explode, either of which is a problem. | |
# We want them to make an array, and do it lazily so we don't have to keep the items in memory! | |
class Enumerator | |
def to_json(state) | |
state.depth += 1 | |
string = "[\n" | |
first_item = true | |
self.each do |item| |
http://guides.rubyonrails.org/migrations.html
AllCops: | |
RunRailsCops: true | |
# Commonly used screens these days easily fit more than 80 characters. | |
Metrics/LineLength: | |
Max: 120 | |
# Too short methods lead to extraction of single-use methods, which can make | |
# the code easier to read (by naming things), but can also clutter the class | |
Metrics/MethodLength: |
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
module AnyFixture | |
INSERT_RXP = /^INSERT INTO ([\S]+)/ | |
class Cache | |
attr_reader :store | |
delegate :clear, to: :store | |
def initialize | |
@store = {} |