# Anchor
click_link 'Save'
# Button
click_button 'awesome'
# Both above
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 | |
class Simple | |
module Implementation | |
alias_method :lookup_orig, :lookup | |
# Give ability to check I18n looked up keys in lazy mode by setting env var I18N_DEBUG to true | |
# | |
def lookup(locale, key, scope = [], options = {}) | |
puts "I18N keys: #{I18n.normalize_keys(locale, key, scope, options[:separator])}" if ENV['I18N_DEBUG'] |
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
# GitHubPrivateRepositoryDownloadStrategy downloads contents from GitHub | |
# Private Repository. To use it, add | |
# `:using => GitHubPrivateRepositoryDownloadStrategy` to the URL section of | |
# your formula. This download strategy uses Homebrew GitHub.api_credentials | |
# to authenticate the request. | |
# This strategy is suitable for corporate use just like S3DownloadStrategy, | |
# because it lets you use a private GitHub repository for internal distribution. | |
class GitHubPrivateRepositoryDownloadStrategy < CurlDownloadStrategy | |
require "utils/formatter" |
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
Show hidden characters
{ | |
"auto_complete": false, | |
"auto_indent": true, | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
$red: #ff0000 | |
$primary-colors: ("red": $red, "green": #00ff00, "blue": #0000ff) | |
// Key and value together |
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
#!/usr/local/var/rbenv/shims/ruby | |
# | |
# Use like this | |
# ./scrap_nytm.rb > file.csv | |
# | |
# You need Nokogiri (gem install nokogiri) | |
# | |
require 'rubygems' |
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
class Time | |
def pretty(format = nil) | |
return unless self | |
if format == :d | |
self.strftime("%b. %-d, %Y") | |
elsif format == :t | |
self.strftime("%l:M%P") | |
elsif format == :db | |
self.strftime("%Y-%m-%d %H:%M:%S") | |
else |