Skip to content

Instantly share code, notes, and snippets.

View eliduke's full-sized avatar
🐕

Eli Duke eliduke

🐕
View GitHub Profile
@eliduke
eliduke / color-test.html
Last active April 17, 2024 00:21
Weird color issues, using the Mac OS color meter, you can see that things are wrong. The first color renders as the second one and so on.
<!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 }

Keybase proof

I hereby claim:

  • I am eliduke on github.
  • I am eliduke (https://keybase.io/eliduke) on keybase.
  • I have a public key ASBuXQthBFeRJtP3nIGvaM46RtFdVHVvkexkGgFm6tEWZAo

To claim this, I am signing this object:

@eliduke
eliduke / lawson.md
Last active December 23, 2015 10:23
Problems with custom LocalResource class

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
@eliduke
eliduke / rooms.rb
Created March 17, 2015 04:18
brightnight
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
@eliduke
eliduke / checklist.md
Last active August 29, 2015 14:16
PDX RailsBridge 2.0 Checklist

PDX RailsBridge 2.0 Checklist!

  • name tags
  • signs for the doors
  • thumb drives / xcode / rails installer (Eli)
  • meal plan
    • Installfest
      • Pizza / Drinks / Snacks
    • Workshop
  • breakfast?
@eliduke
eliduke / a-new-sith-revenge-of-the-hope.md
Last active August 29, 2015 14:10
A New Sith, or Revenge of the Hope

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

@eliduke
eliduke / gist:1d6ddc33e5128ca00733
Created August 23, 2014 00:17
rake db:import error
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'
@eliduke
eliduke / gist:3259046
Created August 4, 2012 17:56
iPhoto Keyword Workflow Sucks
I'm not sure when this feature was pulled, but in the "old days" of iPhoto, it was possible to TAB between keyword fields on photos. Not any more! I have been annoyed by this change for a while now and finally decided to post some feedback. I seriously doubt that this will make any difference, but I'm desperate.
Anyhoo, in the old days, if you selected "Keywords" from the View Menu, a field would appear below each photo and it made tagging photos VERY easy. The work flow was tab, type, tab, type, tab, type. My fingers never left my keyboard. It was smooth. Now, I have to click on a photo, move the cursor and click into the keyword field, type, move the cursor and click on another photo, move the cursor back to the keyword field, type, etc.
It is sluggish and annoying at best.
Why was this change made? How could anyone at Apple think that this workflow was better than the way before? Titles and Ratings both appear below photos, and tabbing between Titles is allowed, so why not Keywords? It seems very incons
@eliduke
eliduke / bookis_rails_template.rb
Created May 13, 2012 06:39 — forked from bookis/bookis_rails_template.rb
Spork + Guard + Bootstrap Rails Template
run "echo TODO > README"
run "rvm use 1.9.2"
run "rvm gemset create #{app_name}"
create_file ".rvmrc", "rvm use 1.9.2@#{app_name}"
gem "rspec-rails" , :group => [ :development, :test ]
gem "guard-rspec" , :group => [ :development, :test ]
gem "spork", "> 0.9.0.rc" , :group => [ :development, :test ]
gem "guard-spork" , :group => [ :development, :test ]
gem "factory_girl_rails" , :group => [ :development, :test ]