Skip to content

Instantly share code, notes, and snippets.

View jeffkreeftmeijer's full-sized avatar
🦞

Jeff Kreeftmeijer jeffkreeftmeijer

🦞
View GitHub Profile
@jeffkreeftmeijer
jeffkreeftmeijer / gist:d243932dd41ef1f94aa48567cf50e83c
Last active September 14, 2016 09:47 — forked from Pjotter/gist:169108c985002ea3bcd1708639e79fb7
Why I decided not to buy new phone
iPhone 5 still looking good. Source: NölSch.de
I own a 2012 iPhone 5 and today I decided that I won’t be buying a new iPhone. I do like the new iPhones, it’s just that I don’t see the added value for me to buy a new one, and I think I’m not the only one in this situation. My “old” iPhone 5 holds up perfectly to my current needs. And I say “current needs” because “Back in the day” I would basically try out all the apps and play all the games. But Today, more than 80% of those apps are long gone. Either I lost interest or they made a really good mobile website that does the job just fine. Today, next to the native apps like Safari and mail, I only regularly use Reddit, Youtube and the mirror apps for Sketch and Photoshop. I have other apps installed, but those are just there when I need them. "You never know when you might need that QR scanner"? Wrong! You never need a QR scanner, so you can safely delete it.
That said, I don’t really need the newest A10 processor or a double photo lens in my daily use. It woul
# Option 1
info = if publication
"Title: #{ publication.title } (ID: #{ publication.id })"
else
'N/A'
end
# Option 2
info = case publication
when Publication then puts "Title: #{ publication.title } (ID: #{ publication.id })"
require 'tempfile'
module Arnold
def edit
YAML.load(change).each { |key, value| write_attribute(key, value) }
end
def edit!
edit
@jeffkreeftmeijer
jeffkreeftmeijer / 4bit_b.png
Created July 29, 2011 15:43 — forked from will/4bit_b.png
codebrawl2
4bit_b.png
<?xml version="1.0"?>
<!DOCTYPE signatures SYSTEM
"file://localhost/System/Library/DTDs/BridgeSupport.dtd">
<signatures version="0.9">
<cftype name='CVBufferRef' type='^{__CVBuffer=}'/>
</signatures>
module PaymentExampleHelpers
def when_amount_is(amount, &block)
context "with an amount of $#{amount}" do
instance_eval(&block)
end
end
end
class TheUppermostClass
def initialize(one, two, three, four)
end
end
class TheInheritingClass < TheUppermostClass
def initialize(one, two, three)
super(one, two, three, 'four')
end
require 'rubygems'
require 'mechanize'
require 'httparty'
# Ugly code, for an ugly hack.
# Hey, if Lighthouse didn't suck then none of this would happen.
# It's been lotsa fun coding it though, so I suppose I should be thankful for the "opportunity"
require 'rubygems'
require 'mechanize'
require 'httparty'
# Ugly code, for an ugly hack.
# Hey, if Lighthouse didn't suck then none of this would happen.
# It's been lotsa fun coding it though, so I suppose I should be thankful for the "opportunity"
require 'rubygems'
require 'httparty'
loop do
response = HTTParty.get 'http://store.apple.com/'
if response.body.include? "We'll be back soon"
puts '.'
else
`say OMG! It\\'s back!`
end