Skip to content

Instantly share code, notes, and snippets.

View danielmorrison's full-sized avatar

Daniel Morrison danielmorrison

View GitHub Profile
@danielmorrison
danielmorrison / holland-with-kids.md
Last active June 24, 2024 17:13
Holland with Kids

Holland with Kids

You're headed to Holland, MI with kids? Here are my recommendations.

Beaches

  1. Holland State Park - Great views of the channel, Big Red Lighthouse. Big beach, popular (avoided by locals) on weekends. Playground, snack shop, bathrooms. Paid vehicle entry.
  2. Tunnel Park - Mile north of Holland State Park. Great beach. Climb to the top for the best views, or go through the tunnel for easy beach access (do both). Playground, bathrooms. Paid vehicle entry.

Beach Hikes

  1. Saugatuck Dunes State Park - 1/2 mile beach trail is easy, or do one of the longer trails if you want more hiking. We go here all year, great spot. Paid parking, or park free in the township park lot for one of the longer hikes (recommend
require "net/http"
require "cgi"
pid = 1
http = Net::HTTP.new('www.pepperjamnetwork.com', 80)
loop do
request = Net::HTTP::Get.new("/affiliate/optout.php?pid=#{pid}&optout=1")
cookie = CGI::Cookie.new("PHPSESSID", "REPLACE WITH ACTUAL SESSION ID")
request['Cookie'] = cookie.to_s
r = http.request(request)
http://🐷🍉🎮💣🍟🍍🐊🍎.🍕💩.ws

Keybase proof

I hereby claim:

  • I am danielmorrison on github.
  • I am danielmorrison (https://keybase.io/danielmorrison) on keybase.
  • I have a public key whose fingerprint is 44D2 A17B 5B7B DD20 FD60 F6DF A1C6 359B 1FAF 4A90

To claim this, I am signing this object:

@danielmorrison
danielmorrison / spec_helper.rb
Created January 31, 2014 20:46
put inside spec/spec_helper.rb inside the RSpec.configure block
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
DatabaseCleaner.clean_with(:truncation)
end
config.around(:each) do |example|
DatabaseCleaner.start
example.run
DatabaseCleaner.clean
end
@danielmorrison
danielmorrison / modifications.textile
Last active December 16, 2015 17:49
Raised garden bed SIPs (sub-irrigated planters)

Based on these plans: http://www.insideurbangreen.org/2010/06/subirrigated-raised-beds-anyone-can-make.html

my modifications:

  • Mine is two 2×8′s tall. That seemed to be deep enough for tomatoes/peppers/etc.
  • I used treated lumber (2nd most expensive variety at Lowe’s, IIRC) unfinished, unpainted. Treated lumber can be bad if it leeches into the potting mix, but since it doesn’t touch our mix (plastic sheeting) there’s no worry!
  • I used a 2" or 3" pvc fill pipe instead of the water bottles. Grab one at Lowe’s, and it’ll be long enough for two planters.
  • I snaked the drain pipe instead of cutting, having the two open ends flush against a wall. Was a bit difficult to keep flat. Enlist a helper or two, or cut.
  • bring the black plastic sheeting all the way up the sides. After filling with dirt, cut it flush with the sides.
  • I put black plastic on top too, tucking it into the sides. You could put mulch overtop, but I was lazy.
# call as `ruby gets_is_wierd.rb some_nonexistant_file.txt`
filename = ARGV[0]
begin
File.open(filename)
rescue Errno::ENOENT => e
print "Rats. File not found. Try another: "
# gets fails here because IO acts on the last file, not STDIN.
# chagning it to STDIN.gets works.
@danielmorrison
danielmorrison / gist:3866520
Created October 10, 2012 15:57
unicode ruby tricks
# If you like this, you'll love:
# https://github.com/collectiveidea/unicode_math
# encoding: utf-8
module Kernel
define_method "√" do |number|
Math.sqrt(number)
end
end
if status_code == 0
# do stuff
elsif status_code == 1
# do stuff
elsif status_code == 2
# do stuff
end
case status_code
when 0