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
| # Some values, they are themselves | |
| true # => true | |
| false # => false | |
| "value" # => "value" | |
| 0 # => 0 | |
| nil # => nil | |
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/ruby | |
| # data set: | |
| # id | name | score | postal | color | |
| # 1 | john | 14 | 12345 | blue | |
| # 2 | jane | 10 | 12345 | blue | |
| # 3 | jeff | 6 | 12345 | green | |
| # define a simple class for holding the dataset |
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
| #!/bin/bash | |
| if [ `echo -n "$DIALOG" | tail -c 1` != "2" ]; then | |
| CHECK=$("$DIALOG" -l | egrep -c 'TextMate — GetBundles') | |
| else | |
| CHECK=$("$DIALOG" nib --list | egrep -c 'TextMate — GetBundles') | |
| fi | |
| [[ ! -d ~/Library/Logs ]] && mkdir -p ~/Library/Logs | |
| rm -f ~/Library/Logs/TextMateGetBundles.log |
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
| # ~/.rvm/gemsets/global.gems | |
| rake | |
| bundler | |
| autotest-fsevent | |
| autotest-growl |
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
| env.each do |key, value| | |
| Rails.logger.error("#{key.inspect} => #{value.inspect}"[0..150]) | |
| end |
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
| /* | |
| As of version 1.1.2, Propane will load and execute the contents of | |
| ~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
| immediately following the execution of its own enhancer.js file. | |
| You can use this mechanism to add your own customizations to Campfire | |
| in Propane. | |
| Below you'll find two customization examples. |
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
| var validate = (function() { | |
| var c = { log: function() {} }; | |
| // var c = console; | |
| var f = function() { | |
| $(this).each(function() { | |
| var t = $(this); | |
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
| # This is a template .gitignore file for git-managed WordPress projects. | |
| # | |
| # Fact: you don't want WordPress core files, or your server-specific | |
| # configuration files etc., in your project's repository. You just don't. | |
| # | |
| # Solution: stick this file up your repository root (which it assumes is | |
| # also the WordPress root directory) and add exceptions for any plugins, | |
| # themes, and other directories that should be under version control. | |
| # | |
| # See the comments below for more info on how to add exceptions for your |
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
| def indefinitize(string) | |
| vowels = "aeiou".split(//) | |
| vowels.include?(string.first.downcase) ? "an #{string}" : "a #{string}" | |
| end |
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
| <%= highlight(t(:'.confirm', :resource => resource, :default => :'delete.confirm'), resource.to_s) %> | |
| <%= semantic_form_for resource, :html => { :method => :delete } do |form| %> | |
| <%= form.buttons do %> | |
| <%= form.commit_button :delete %> | |
| <% end %> | |
| <% end %> |