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" | |
ruby "2.2.0" | |
gem "activerecord", "4.2.0" | |
gem "sqlite3" |
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
Lightroom 5 standalone (non-CC crap) | |
http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5852&fileID=5888 | |
Photoshop CS5 Extended | |
http://helpx.adobe.com/creative-suite/kb/cs5-product-downloads.html |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Title</title> | |
<meta property="description" ng-attr-content="Wrong description" content="Description" /> | |
<meta property="og:title" ng-attr-content="Wrong title" content="Title" /> | |
<meta property="og:description" ng-attr-content="Wrong description" content="Description" /> | |
<meta property="og:type" content="website" /> |
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
$id = kubectl get pods | grep api | grep Running | head -n1 | cut -d' ' -f1 | |
kubectl exec $id -it bash |
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
IRB.conf[:AUTO_INDENT]=true | |
require 'rubygems' | |
require 'pp' | |
require 'what_methods' | |
require 'wirble' | |
Wirble.init | |
Wirble.colorize | |
# Easily print methods local to an object's class |
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
Link: { | |
Toggle: Behavior.create({ | |
initialize: function(toggleElement) { | |
this.addText = this.element.innerHTML; | |
this.cancelText = 'cancel'; | |
this.toggleElement = $(toggleElement); | |
}, | |
onclick: function(event) { | |
var element = event.element(); |
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
# Copied from http://github.com/shuber/validates_existence, | |
# modified to be compatible with the latest (2.10.2) version of shoulda | |
class Test::Unit::TestCase | |
def self.should_validate_existence_of(*associations) | |
allow_nil = get_options!(associations, :allow_nil) | |
associations.each do |association| | |
should "require #{association} exists" do | |
reflection = subject.class.reflect_on_association(association) | |
object = subject |
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
require 'httparty' | |
require 'json' | |
class Campfire | |
include HTTParty | |
base_uri 'http://your_domain.campfirenow.com' | |
basic_auth 'your_auth_token', 'whatever' | |
headers "Content-Type" => "application/json" | |
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
module I18n | |
module Backend | |
# Expirable cache module that stores unpluralized and uninterpolated translations | |
module ExpirableCache | |
include Cache | |
protected | |
def fetch(*args}, &block) | |
locale, key, options = *args | |
options ||= {} |
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
# Based on I18n::Backend::ActiveRecord::Missing, but provides some additional features: | |
# - creates Translation object for each locale defined in I18n.available_locales | |
# - looks up the translation using Simple backend and sets it as Translation#value | |
# | |
# Important! Remember to provide i18n.plural.keys in your YAML files. For example: | |
# | |
# # en.yml | |
# en: | |
# i18n: | |
# plural: |
OlderNewer