This could be a way to create fun little websites without having to put tooooo much effort into it.
Because look how simple this is? You can easily add images...
| require 'json' | |
| require 'date' | |
| require 'fileutils' | |
| require 'timezone' | |
| # Load specific Day One json data file | |
| json_data = JSON.load_file('Media.json') | |
| # Existing directory where to put everything | |
| export_dir = 'Media' |
| iPhone 393 x 844 | |
| Device Pixel Ratio 3 | |
| Mozilla/5.0 (iPhone; CPU iPhone OS 18_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0.1 Mobile/15E148 Safari/604.1 | |
| iPad 810 x 1080 | |
| Device Pixel Ration 2 | |
| Mozilla/5.0 (iPad; CPU OS 17_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1 |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title></title> | |
| <style> | |
| h1 { padding: 30px } |
I hereby claim:
To claim this, I am signing this object:
Lawson,
re: http://viget.com/extend/make-remote-files-local-with-ruby-tempfile
I have created my own This American Life archive (http://thisamericanlife.co) and I am using your AWESOME LocalResource class to import the remote jpg and mp3 associated with each episode to an s3 bucket. It has been awesome and very functional for months and it just stopped working the other day. I think maybe part of the problem was that they changed the download link, but I got that sorted and then kept getting errors and went down a big rabbit hole and now here I am creating this gist in hopes that some of this makes sense and you can help steer me in the right direction. So, here's my breakdown...
To start off, I am requiring both open-uri and httparty in my application.rb. Also, I pulled LocalResource into it's own class (lib/local_resource.rb):
class LocalResource
| entry = Room.new <<-ENTRY | |
| You've entered the spookiest of houses. | |
| There is a creaky STAIRCASE in front of you, to the NORTH, with an open DOOR next to it. There is a slightly open DOOR to WEST and a potentially locked DOOR to the EAST. This is **the creepiest place you have ever been. | |
| ENTRY | |
| dining_room = Room.new <<-DINING_ROOM | |
| You've entered the Dining Room. | |
| DINING_ROOM | |
| study = Room.new <<-STUDY |
If we accept all the Star Wars films as the same canon (as it seems we must) then a lot that happens in the original films has to be reinterpreted in the light of the prequels. As we now know, the rebel Alliance was founded by Yoda, Obi-Wan Kenobi and Bail Organa. What can readily be deduced is that their first recruit, who soon became their top field agent, was R2-D2.
Consider: at the end of Revenge of the Sith, Bail Organa orders 3PO's memory wiped but not R2's. He would not make the distinction casually. Both droids know that Yoda and Obi-Wan are alive and are plotting sedition with the Senator from Alderaan. They know that Amidala survived long enough to have twins and could easily deduce where they went. However, it can be assumed that R2 makes an impassioned speech to the effect that he is far more use to them with his mind intact: he has observed Palpatine and Anakin at close quarters for many years, knows much that is useful and is one of the galaxy's top experts at hacking into other people's syste
| date-master: rake db:import | |
| Backing Up Production Database... | |
| /Users/eli/.gem/ruby/2.1.1/gems/bundler-1.7.0/lib/bundler/definition.rb:399:in `validate_ruby!': Your Ruby version is 1.9.3, but your Gemfile specified 2.1.1 (Bundler::RubyVersionMismatch) | |
| from /Users/eli/.gem/ruby/2.1.1/gems/bundler-1.7.0/lib/bundler.rb:117:in `setup' | |
| from /Users/eli/.gem/ruby/2.1.1/gems/bundler-1.7.0/lib/bundler/setup.rb:17:in `<top (required)>' | |
| from /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
| from /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
| Downloading Database Dump... | |
| /Users/eli/.gem/ruby/2.1.1/gems/bundler-1.7.0/lib/bundler/definition.rb:399:in `validate_ruby!': Your Ruby version is 1.9.3, but your Gemfile specified 2.1.1 (Bundler::RubyVersionMismatch) | |
| from /Users/eli/.gem/ruby/2.1.1/gems/bundler-1.7.0/lib/bundler.rb:117:in `setup' |