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
%div | |
.who-and-when | |
.avatar | |
= modification.avatar | |
suggested by | |
= modification.created_by | |
= modification.created_at | |
.description | |
= modification.friendly_description |
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
⮁ ruby benchmark.rb > benchmark.txt | |
benchmark.rb:33:in `block (3 levels) in <main>': undefined method `push' for #<RR::DoubleDefinitions::DoubleDefinition:0x007fe9aa28e240> (NoMethodError) | |
from benchmark.rb:31:in `times' | |
from benchmark.rb:31:in `block (2 levels) in <main>' | |
from /Users/costro0001/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:280:in `measure' | |
from /Users/costro0001/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:362:in `item' | |
from benchmark.rb:30:in `block in <main>' | |
from /Users/costro0001/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:174:in `benchmark' | |
from /Users/costro0001/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:205:in `bm' | |
from benchmark.rb:11:in `<main>' |
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
source ':-D' | |
source :rubygems | |
gem 'rails', '~> 3.1.4' | |
gem 'rake', '~> 0.9.2' | |
gem 'mysql2', '~> 0.3.11' | |
gem 'activerecord-sqlserver-adapter', '~> 3.1.4' # must match rails minor version | |
gem 'tiny_tds' |
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
source ":-D" | |
source :rubygems | |
gem "rails", "~> 3.1.4" | |
gem "rake", "~> 0.9.2" | |
gem "mysql2", "~> 0.3.11" | |
gem "activerecord-sqlserver-adapter", "~> 3.1.4" # must match rails minor version | |
gem "tiny_tds" |
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
$(function(){ | |
/* currency converter */ | |
$('#link-currency').click(function(e){ | |
e.preventDefault(); | |
$('#popup-currency').toggleClass('active'); | |
}); | |
/* add style to form when input is highlighted */ | |
$('#bid_amount').focus(function(){ $('form#new_bid').addClass('focused'); }); |
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 auction_date_range(auction, format) | |
return unless auction.start_date && auction.end_date | |
returning([auction.start_date.eztime(format), auction.end_date.eztime(format)]) do |a| | |
def a.to_s; join(' to '); end | |
end | |
end | |
def lot_date_range(lot, format) | |
return unless lot.open_date && lot.close_date | |
returning([lot.open_date.eztime(format), lot.close_date.eztime(format)]) do |a| |
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
Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.8.0 | |
gem uninstall nokogiri -xI; | |
brew update; | |
brew uninstall libxml2; | |
brew install libxml2 --with-xml2-config; | |
brew link libxml2; | |
brew install libxslt; |
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 | |
# This script will switch all textual columns in your db to a new encoding | |
# without switching the actual bytes in those columns. If you had a dumb | |
# programming language like Ruby 1.8 that dumped a bunch of utf8-encoded | |
# strings into your latin1 database columns, then switching to a better | |
# programming language (like Ruby 1.9) may get you some weird results. MySQL | |
# will try to be helpful, and convert the stored bytes from latin1 to utf8. But | |
# since they're already in utf8, you get gobblidigook. | |
# | |
# Find more detail and a more complete description of the strategy used here at |
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 playbook is an example for deploying multiple instances into EC2/Euca and "doing something" with them. | |
# - uses the ec2 and ec2_vol module. | |
# | |
# Run this with ansible-playbook and supply the private key for your EC2/Euca user (to access the instance in the second play), e.g: | |
# ansible-playbook eucalyptus-ec2-deploy.yml -v --private-key=/path/to/ec2/pri/key | |
- name: Set up a new ubuntu instance and register it in your ansible inventory file | |
hosts: local | |
connection: local | |
user: root |
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
--- | |
# Run this with ansible-playbook and supply the private key for your EC2/Euca | |
# user (to access the instance in the second play), e.g: | |
# ansible-playbook eucalyptus-ec2-deploy.yml -v --private-key=/path/to/ec2/pri/key | |
- name: Set up a new ubuntu instance and register it in your ansible inventory file | |
hosts: local | |
connection: local | |
user: root | |
gather_facts: false |