Skip to content

Instantly share code, notes, and snippets.

View jackjennings's full-sized avatar
⛰️

Jack Jennings jackjennings

⛰️
View GitHub Profile
Drink
* name:string
* has_many :steps
* has_many :ingredients
Ingredient
* has_one :measurement
* has_one :component
Component
namespace :rvm do
task :trust_ruby_env do
on roles(:web) do
within release_path do
execute "#{fetch(:rvm_path)}/bin/rvm", "rvmrc trust #{release_path}/.ruby-env"
end
end
end
end
label::after {
content: "";
height: 8px;
width: 0;
border-top: 7px solid $color-white;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
position: absolute;
right: 16px;
top: 14px;
$ cutest dig.rb
.
test: should get remaining segments from ReturnsSegmentsDigger
line: assert_equal ['two', 0], data.dig('one', 'two', 0)
file: dig.rb +53
Cutest::AssertionFailed: ["two", 0] != [0]
class NewsItemsController < ApplicationController
include Dateable
has_scope :page, default: 1
has_scope :year
def index
@year_range = NewsItem.year_range
@records = apply_scopes(default_scope)
@jackjennings
jackjennings / posts.scss
Last active August 29, 2015 14:22 — forked from briansw/posts.scss
.posts {
@include whitespacefix;
@include c6;
@include nogutters;
.post {
@include inlineblock;
@include c2;
@include regular;
}
@mixin inline-grid($object, $width, $gutter: 30px) {
font-size: 0;
.#{$object}s {
margin-right: -$gutter;
}
.#{$object} {
@include text;
display: inline-block;
@include archive(exhibition) {
@include and-card(regular-archive) {
@include full-width;
@include meta-margin-small;
@include float-grid(post, 33%);
@include green-background;
@extend %expandable-archive;
.posts {
@include animated-height;
def cap_install!
log :capify, ""
in_root do
run("#{extify(:cap)} install", verbose: false)
end
end
def include_cap_modules(cap_modules)
escaped_modules = cap_modules.map(&Regexp.method(:escape))
matcher = /require 'capistrano\/(#{escaped_modules.join('|')})'/