# In you Gemfile
gem("hash_with_struct_access_yaml_loader", :git => "git://gist.github.com/1893175.git")
# In your code
HashWithStructAccess.load_yaml_file("load_me.yml")
This file has been truncated, but you can view the full file.
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
| 80470 => 80470 | |
| ABC => ABC | |
| ABM => ABM | |
| ACL => ACL | |
| ACPI => ACPI | |
| ADAC => ADAC | |
| ADSL => ADSL | |
| AEG => AEG | |
| AG => AG | |
| AGP => AGP |
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
| ~ vi --version | |
| VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02) | |
| Compiled by root@apple.com | |
| Normal version without GUI. Features included (+) or not (-): | |
| -arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent | |
| -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments | |
| -conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs | |
| -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path | |
| +find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv | |
| +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent |
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
| diff --git a/Library/Formula/elasticsearch.rb b/Library/Formula/elasticsearch.rb | |
| index bed30bf..054c9ce 100644 | |
| --- a/Library/Formula/elasticsearch.rb | |
| +++ b/Library/Formula/elasticsearch.rb | |
| @@ -105,7 +105,11 @@ class Elasticsearch < Formula | |
| <key>EnvironmentVariables</key> | |
| <dict> | |
| <key>ES_JAVA_OPTS</key> | |
| - <string>-Xss200000</string> | |
| + <string>-Xss200000 -XX:PermSize=500m -XX:MaxPermSize=500m</string> |
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
| User = require '../models/user' | |
| exports.index = (req, res, next) -> | |
| [page, perPage] = [parseInt(req.query.page, 10) or 0, 5] | |
| require('async').parallel [ | |
| (next) -> User.count next, | |
| (next) -> User.find({}).sort(username: 1).skip(page * perPage).limit(perPage).exec next | |
| ], (err, [count, users]) -> | |
| return next err if err? | |
| res.render 'users/index', {users, page, perPage, count} |
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 Customer | |
| class BaseController < ApplicationController | |
| # ... | |
| before_filter :enable_live_notifications, only: [:waiter_home, :cook_home] | |
| # ... | |
| private | |
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
| require 'fileutils' | |
| include FileUtils | |
| def sh(cmd) | |
| puts %x{#{cmd}} | |
| end | |
| puts "What's your app's name? " | |
| app_name = STDIN.gets.chomp |
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/bin/env ruby | |
| # | |
| # Visual dialog for "Kick it!" (https://github.com/infopark/kick-it) | |
| # | |
| # Requires http://mstratman.github.io/cocoadialog | |
| # Useful for example in combination with http://fitztrev.github.io/shuttle | |
| # | |
| cocoa_dialog_command = '~/Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog' \ |
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/bin/env ruby | |
| require 'tmpdir' | |
| unless gem_name = ARGV.first | |
| puts 'Usage: check-gem GEM_NAME' | |
| exit 1 | |
| end | |
| Dir.mktmpdir("check-gem-#{gem_name}") do |tmpdir| |
OlderNewer