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
# in /tasks/scheduler.rake | |
desc "Called by Heroku cron add-on to stop spin down" | |
task :call_page => :environment do | |
uri = URI.parse('http://www.mikeholubowski.com/') | |
Net::HTTP.get(uri) | |
puts 'Pinged the site!' | |
end | |
# then use the heroku cron add-on to schedule it for every x minutes |
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 print_every_3_seconds num | |
5.times do | |
puts "Thread #{num}" | |
sleep 3 | |
end | |
puts "** DONE #{num} **" | |
end | |
(1..100).each do |num| | |
Thread.new do |
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 replaceProject(linkTarget) { | |
var area = $('#projectArea'); | |
area.animate({right: '100%'}, 500, function() { | |
area.load(linkTarget + ' ' + '#projectArea'); | |
area.animate({right: '0%'},1000, null); | |
urlSwap(linkTarget); | |
}); | |
} | |
NewerOlder