source 'https://rubygems.org'
gem 'rack'
gem 'puma'
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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" |
In case anyone else is automating their Firefox + puma-dev setup, here's one way to install the puma-dev CA cert without using the GUI or other manual intervention:
# Tell Firefox about the puma-dev CA cert. Don't care whether Firefox is
# currently installed, since we still need this to work when/if it is.
#
# https://github.com/mozilla/policy-templates/blob/master/README.md#certificates--install
for firefox in firefox firefoxdeveloperedition; do
plist="/Library/Preferences/org.mozilla.$firefox.plist"
[[ -f "$plist" ]] || sudo plutil -create xml1 "$plist"