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 Komariq | |
def self.update_entries(criteria, action) | |
while true | |
needs_update = criteria.call | |
count = needs_update.count | |
if count > 0 | |
Rails.logger.info "#{count} feeds need to be updated" | |
needs_update.each do |entry| | |
begin | |
Rails.logger.info "Feed #{feed.id} is going to be updated" |
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
# written by faze, revised by BlastHardcheese | |
crawl () { | |
case "$1" in | |
"cao" ) | |
local user="joshua" | |
local server="crawl.akrasiac.org" | |
;; | |
"cdo" ) | |
local user="crawl" |
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 | |
gem1.8 list --local --no-versions > 1.8.txt | |
gem1.9 list --local --no-versions > 1.9.txt | |
diff gem1.8.txt gem1.9.txt |
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 'benchmark' | |
include Benchmark | |
n = 10000000 | |
Benchmark.bm do |test| | |
test.report("Double quotes:") do | |
n.times do |x| | |
str = "A string without newline" | |
end | |
end |