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
| outsidein@ey05-s00398 ~ $ df -h | |
| Filesystem Size Used Avail Use% Mounted on | |
| /dev/sda1 6.0G 6.0G 0 100% / | |
| udev 10M 124K 9.9M 2% /dev | |
| shm 769M 0 769M 0% /dev/shm | |
| /dev/sdb1 19G 2.4G 17G 13% /data |
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
| # File activesupport/lib/active_support/core_ext/class/attribute_accessors.rb, line 10 | |
| def cattr_reader(*syms) | |
| options = syms.extract_options! | |
| syms.each do |sym| | |
| next if sym.is_a?(Hash) | |
| class_eval("unless defined? @@\#{sym}\n@@\#{sym} = nil\nend\n\ndef self.\#{sym}\n@@\#{sym}\nend\n", __FILE__, __LINE__ + 1) | |
| unless options[:instance_reader] == false | |
| class_eval("def \#{sym}\n@@\#{sym}\nend\n", __FILE__, __LINE__ + 1) | |
| 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
| require 'spec/runner/formatter/base_text_formatter' | |
| require 'spec/runner/formatter/no_op_method_missing' | |
| module Spec | |
| module Runner | |
| module Formatter | |
| class ImmediateFailureFormatter < BaseTextFormatter | |
| include NOOPMethodMissing | |
| def example_failed(example, counter, failure) |
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 index | |
| search = PartnerPage.find_all_by_indexed_name(params[:term]) | |
| names = search.hits.map do |h| | |
| name = h.stored(:name_kword) | |
| url = partner_page_url(h.stored(:friendly_id)) | |
| { :value => name, :id => url } | |
| 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
| SELECT DISTINCT message_id | |
| FROM SELECT *, id AS message_id FROM user_messages WHERE user_id = ? | |
| AND read = false AND parent_id IS NULL AS initial_messages | |
| UNION | |
| SELECT *, parent_id AS message_id FROM user_messages WHERE user_id = ? | |
| AND read = false AND parent_id IS NOT NULL AS replies; |
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
| SELECT DISTINCT message_id | |
| FROM SELECT *, id AS message_id FROM user_messages WHERE user_id = ? | |
| AND read = false AND parent_id IS NULL AS initial_messages | |
| UNION | |
| SELECT *, parent_id AS message_id FROM user_messages WHERE user_id = ? | |
| AND read = false AND parent_id IS NOT NULL AS replies; |
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
| Remember to use BigDecimal when multiplying floats in Ruby! | |
| ruby-1.9.2-p290 :001 > 8.19 * 1_000_000.0 | |
| => 8189999.999999999 |
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
| for i in `git br -r | grep -v master | sed 's/origin\///'` ; do git push origin :$i ; sleep 1 ; done |
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 Rails | |
| # Don't abort when tests fail; move on the next test task. | |
| # Silence the default description to cut down on `rake -T` noise. | |
| class SubTestTask < Rake::TestTask | |
| # Create the tasks defined by this task lib. | |
| def define | |
| lib_path = @libs.join(File::PATH_SEPARATOR) | |
| task @name do | |
| puts "running sub test task #{@name}" | |
| run_code = '' |
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
| justin ~/Code/atea $ lein clean | |
| justin ~/Code/atea $ lein deps | |
| Copying 4 files to /Users/justin/Code/atea/lib | |
| Copying 2 files to /Users/justin/Code/atea/lib/dev | |
| justin ~/Code/atea $ lein native-deps | |
| WARNING: lancet namespace is deprecated; use lancet.core. | |
| [WARNING] POM for 'org.clojars.pka:jdic-macos-tray:pom:0.0.2:compile' is invalid. | |
| Its dependencies (if any) will NOT be available to the current build. | |
| Expanding: /Users/justin/.m2/repository/org/clojars/pka/jdic-macos-tray/0.0.2/jdic-macos-tray-0.0.2.jar into /Users/justin/Code/atea |
OlderNewer