git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
https://ortastuff.s3.amazonaws.com/gifs/bike.gif | |
https://ortastuff.s3.amazonaws.com/gifs/bug-hunting.gif | |
https://ortastuff.s3.amazonaws.com/gifs/cheers-boxing.gif | |
https://ortastuff.s3.amazonaws.com/gifs/clap-2.gif | |
https://ortastuff.s3.amazonaws.com/gifs/clap.gif | |
https://ortastuff.s3.amazonaws.com/gifs/danger.gif | |
https://ortastuff.s3.amazonaws.com/gifs/delisa-nah.gif | |
https://ortastuff.s3.amazonaws.com/gifs/delisa-one-thumb.gif | |
https://ortastuff.s3.amazonaws.com/gifs/delisa-two-thumbs-2.gif | |
https://ortastuff.s3.amazonaws.com/gifs/delisa-two-thumbs.gif |
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
Motion::Project::App.setup do |app| | |
app.info_plist['API_BASE_URL'] = ENV['API_BASE_URL'] || 'http://api.myserver.com' | |
end | |
task :cucumber => [:stub, :'build:simulator', :'calabash:run'] | |
task :stub do | |
ENV['API_BASE_URL'] = 'http://stub.example.com' | |
end | |
# MODEL | |
class Case < ActiveRecord::Base | |
include Eventable | |
has_many :tasks | |
concerning :Assignment do | |
def assign_to(new_owner:, details:) | |
transaction do |
#!/usr/bin/env ruby | |
# Determines the coordinates (latitude and longitude) of the places or | |
# addresses passed as arguments (either on the command line or via stdin) | |
# and prints the results. | |
# This script requires the Ruby Geocoder gem by Alex Reisner | |
# (http://www.rubygeocoder.com). | |
# To install the gem, run this command from a Terminal session: | |
# |
class UIView | |
def top | |
frame.origin.y | |
end | |
def left | |
frame.origin.x | |
end | |
def height | |
frame.size.height | |
end |
module Forwardable | |
FORWARDABLE_VERSION = "1.1.0" | |
@debug = nil | |
class << self | |
attr_accessor :debug | |
end | |
# Takes a hash as its argument. The key is a symbol or an array of | |
# symbols. These symbols correspond to method names. The value is |
#Restaurants near 1871
Help curate this list. start filling out the data and links about each place and add places!
##Cheap
In researching topics for RailsCasts I often read code in Rails and other gems. This is a great exercise to do. Not only will you pick up some coding tips, but it can help you better understand what makes code readable.
A common practice to organize code in gems is to divide it into modules. When this is done extensively I find it becomes very difficult to read. Before I explain further, a quick detour on instance_eval
.
You can find instance_eval
used in many DSLs: from routes to state machines. Here's an example from Thinking Sphinx.
class Article < ActiveRecord::Base