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
# Add some useful methods to the Ruby Array class. | |
# For Rails, add this class into the "initializers" folder: | |
# config/initializers/array.rb | |
class Array | |
# Group the array's elements. | |
# | |
# Arguments: | |
# r: (Integer) | |
# - Max amount of elements each array's subgroup will have. | |
def arrange(r) |
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
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" TODO: this may not be in the correct place. It is intended to allow overriding <Leader>. | |
" source ~/.vimrc.before if it exists. | |
if filereadable(expand("~/.vimrc.before")) | |
source ~/.vimrc.before | |
endif | |
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
let g:yadr_using_unsolarized_terminal = 1 |
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
var koa = require('koa'), | |
app = module.exports = koa(), | |
route = require('koa-route'); | |
// x-response-time | |
app.use(function *(next){ | |
var start = new Date; | |
yield next; | |
var ms = new Date - start; | |
this.set('X-Response-Time', ms + 'ms'); |
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
--color | |
--format=documentation |
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
/.bundle | |
/db/*.sqlite3 | |
/db/*.sqlite3-journal | |
/log/*.log | |
/tmp | |
.swp | |
.rspec | |
Guardfile |
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
# ==== Required configuration settings ==== | |
# Replace the following with the output from "rake secret" | |
APP_SECRET_TOKEN=REPLACE_ME_NOW! | |
# This is the domain where your instance will be running | |
DOMAIN=localhost:3000 | |
# Optionally set an asset host | |
# ASSET_HOST=http://assets.example.com |
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
source 'https://rubygems.org' | |
gem 'rails', '4.1.8' | |
# infrastructure | |
gem 'dotenv-rails', groups: [:development, :test] | |
gem 'puma' | |
gem 'pg' | |
# backend |
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
default: &default | |
adapter: <%= ENV['DATABASE_ADAPTER'] %> | |
pool: <%= ENV['DATABASE_POOL'] %> | |
timeout: <%= ENV['DATABASE_TIMEOUT'] %> | |
encoding: <%= ENV['DATABASE_ENCODING'] %> | |
host: <%= ENV['DATABASE_HOST'] %> | |
username: <%= ENV['DATABASE_USERNAME'] %> | |
password: <%= ENV['DATABASE_PASSWORD'] %> | |
development: |
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
# Ring the bell if any background window rang a bell | |
set -g bell-action any | |
# Default termtype. If the rcfile sets $TERM, that overrides this value. | |
set -g default-terminal screen-256color | |
# Keep your finger on ctrl, or don't | |
bind-key ^D detach-client | |
# Create splits and vertical splits |
OlderNewer