This file contains 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
find . -name .svn -print0 | xargs -0 rm -rf |
This file contains 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
git tag | grep staging | xargs -n 1 -I % git push origin :refs/tags/% |
This file contains 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
defaults write com.apple.Safari IncludeDebugMenu 1 |
This file contains 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
scope :is_a, lambda { |role| joins(:roles).where("roles.name = ?", role) } | |
scope :subscribed_to, lambda { |book_id| joins(:subscriptions).where("subscriptions.book_id = ?", book_id) } | |
scope :authors, User.is_a("author") | |
scope :testers, User.is_a("tester") | |
scope :accountants, User.is_a("accountant") | |
scope :admins, User.is_a("admin") |
This file contains 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 notify_subscriber_if_status_changed | |
if status_changed? && %w[success printed fail].include?(status) | |
status_message = status_notification | |
send_notifications(status_message) | |
end | |
end | |
def send_notifications(status_message) | |
target_market = (Rails.env.development?) ? User.testers.subscribed_to(self.id) : subscribers | |
target_market.each do |target| |
This file contains 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 | |
if `egrep -rls "^<<<<<<< |^>>>>>>> |^=======$" * | xargs file | egrep 'script|text'` != "" | |
puts "Merge cruft alert!" | |
puts `egrep -rls "^<<<<<<< |^>>>>>>> |^=======$" * | xargs file | egrep 'script|text' | awk -F: '{print $1}'` | |
exit(1) | |
end |
This file contains 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
silence_warnings do | |
require 'pry' | |
IRB = Pry | |
end |
This file contains 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
<meta property="og:description" content="Italian seismologists face time in prison, Microsoft's new platform goes mobile and a new robot poisons weeds among the lettuce" /> | |
<meta property="og:title" content="Babbage: Lettuce pickers beware" /> | |
<meta property="og:type" content="video.other" /> | |
<meta property="og:url" content="http://swat2.demo.economist.com/multimedia?bclid=1294626183001&bctid=1920852778001" /> | |
<meta name="twitter:card" content="player" /> | |
<meta name="twitter:site" content="@TheEconomist" /> | |
<meta name="twitter:image" content="https://www.google.co.uk/images/srpr/logo3w.png" /> | |
<meta name="twitter:player" content="https://secure.brightcove.com/services/viewer/federated_f9/?isVid=1&isUI=1&playerID=1761156120001&videoId=1920852778001&autostart=true&secureConnections=true" /> | |
<meta name="twitter:player:height" content="270" /> | |
<meta name="twitter:player:width" content="395" /> |
This file contains 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
<meta name="twitter:card" content="summary" /> | |
<meta name="twitter:image" content="https://media.economist.com/sites/default/files/images/print-edition/20120908_BKP001_0.jpg" /> | |
<meta name="twitter:site" content="@TheEconomist" /> | |
<meta property="og:description" content="The End of Men: And the Rise of Women. By Hanna Rosin. Riverhead; 310 pages; $27.95. To be published in Britain in October; £12.99. Buy from Amazon.com,..." /> | |
<meta property="og:site_name" content="The Economist" /> | |
<meta property="og:title" content="Female muscle" /> | |
<meta property="og:type" content="article" /> | |
<meta property="og:url" content="http://swat2.demo.economist.com/node/21562174" /> |
This file contains 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
key_buffer_size=1300M | |
innodb_flush_log_at_trx_commit=0 | |
innodb_buffer_pool_size=768M | |
innodb_log_file_size=2047M | |
innodb_log_buffer_size=512M | |
innodb_thread_concurrency=3 | |
innodb_read_io_threads=4 | |
innodb_write_io_threads=4 | |
innodb_flush_method=O_DIRECT | |
innodb_file_per_table |
OlderNewer