-
Rake task to backup MySQL to Amazon S3
A simple rake task to dump the contents of a MySQL database and save it to an Amazon S3 bucket. Use together with whenever to automate it.
namespace :backup do task :nightly do timestamp = Time.now.strftime("%Y-%m-%d_%H-%M-%S") backup_file = "tmp/backups/#{timestamp}_dump.sql.gz" `mkdir -p tmp/backups` `mysqldump -u root {DATABASE_NAME} | gzip -c > #{backup_file}` send_to_s3 backup_file end def send_to_s3(file_path) bucket = "{BUCKET_NAME}" file_name = File.basename(file_path) AWS::S3::DEFAULT_HOST.replace "s3-us-west-2.amazonaws.com" AWS::S3::Base.establish_connection!( :access_key_id => '{KEY}', :secret_access_key => '{SECRET}') AWS::S3::S3Object.store( "backups/#{file_name}", File.open("#{file_path}"), bucket) end end
-
My Last Days: Meet Zach Sobiech
Zach Sobiech was diagnosed with terminal cancer at age 14. He used the small amount of time he had left to produce music, which has reached and touched millions.
I want to be remembered as the kid who went down fighting and didn’t really lose.
Zach passed away on May 20, 2013. Buying his album on iTunes will support a cancer research fund set up on his behalf, or you can donate directly.
-
Pokemon Fusion: Behind the Scenes
I’ve been getting a few questions about the script used to generate the Pokemon Fusion sprites, so I thought I would write a quick blog post to describe the process.
The inspiration of the website was the idea that it should be possible to automate the process of combining pokemon sprites, and each image is automatically generated by a computer script. Some of the results are less impressive than others, but I think that it adds to the fun and makes it that much more satisfying when you come across ones that work really well.
-
Save to Pocket - OSX Service
Here’s a quick Mac OSX service that will allow you to save any link to Pocket by right-clicking it. It will work from within basically any app that lets you right-click text. Prerequisite is that you have the Pocket OSX app installed.
After downloading, unzip and place the file in ~/Library/Services (or create the folder first if it doesn’t exist already)
After doing so, you should be able to simply highlight a link and right-click it to see the “Save to Pocket” option. (You might find it under a “Services” category)
-
'Gitmo is Killing Me'
A chilling story told by a prisoner at Guantanamo Bay. I hope that someday we’ll look back and wonder how anything like this could have been possible.
I’ve been detained at Guantánamo for 11 years and three months. I have never been charged with any crime. I have never received a trial.
[…]
The situation is desperate now. All of the detainees here are suffering deeply. At least 40 people here are on a hunger strike. People are fainting with exhaustion every day. I have vomited blood.
And there is no end in sight to our imprisonment. Denying ourselves food and risking death every day is the choice we have made.
I just hope that because of the pain we are suffering, the eyes of the world will once again look to Guantánamo before it is too late. -
North Korea missle launch delayed by Windows 8
#OnionOrActualHeadline
The announcement from the Korean Central News Agency (KCNA) did not indicate a new scheduled time for a missile test, saying only that it was “working with Windows 8 support to resolve the issue.”
A source close to the North Korean regime reported that Supreme Leader Kim Jong-un is furious about the Windows 8 problems and is considering a number of options, including declaring war on Microsoft.