Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"to install it.
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management | 
Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"to install it.
| #!/bin/bash | |
| # -------------------------------------------------------------------------------------------- | |
| # Installs Ruby 2.5 using rbenv/ruby-build on the Raspberry Pi (Raspbian) | |
| # | |
| # Run from the web: | |
| # bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh) | |
| # -------------------------------------------------------------------------------------------- | |
| # Welcome message | 
| ActiveRecord cheat sheet / EXAMPLES | |
| INSTALL | |
| ======= | |
| $ gem install activerecord | |
| in GEMFILE: gem ‘activerecord’ | |
| REQUIRE | |
| ======= | |
| require ‘active_record’ | 
| GIT | |
| remote: https://github.com/spree-contrib/spree_i18n.git | |
| revision: 5021782dacb25c906b52925cec25494fbdd78dea | |
| specs: | |
| spree_i18n (3.3.2) | |
| i18n_data | |
| kaminari-i18n | |
| rails-i18n | |
| routing-filter | |
| spree_core (>= 3.1.0, < 4.0) | 
| # EditorConfig is awesome: https://EditorConfig.org | |
| # top-most EditorConfig file | |
| root = true | |
| # Unix-style newlines with a newline ending every file | |
| [*] | |
| end_of_line = lf | |
| trim_trailing_whitespace = true | |
| charset = utf-8 | 
| # Usage: | |
| # | |
| # class MyClass < ActiveRecord::Base | |
| # ... | |
| # validate :postal_code, spanish_postal_code: true # default message | |
| # validate :postal_code, spanish_postal_code: { message: '<Your message>' } # custom message | |
| # ... | |
| # end | |
| # | |
| class SpanishPostalCodeValidator < ActiveModel::EachValidator | 
| class CreateInvoiceNumbers < ActiveRecord::Migration | |
| def up | |
| create_table :invoice_numbers do |t| | |
| t.integer :year, null: false, unique: true | |
| t.integer :next_number_within_year, null: false, default: 1 | |
| end | |
| add_index :invoice_numbers, :year, unique: true | |
| (2016..2045).each do |year| | 
| ############################################################################## | |
| # Calendar Heatmap # | |
| # by # | |
| # Paul Bleicher # | |
| # an R version of a graphic from: # | |
| # http://stat-computing.org/dataexpo/2009/posters/wicklin-allison.pdf # | |
| # requires lattice, chron, grid packages # | |
| ############################################################################## | |
| ## calendarHeat: An R function to display time-series data as a calendar heatmap |