Skip to content

Instantly share code, notes, and snippets.

🤔
Trying to figure out how to look up comments I've left

Pat Maddox patmaddox

🤔
Trying to figure out how to look up comments I've left
View GitHub Profile
View page_fetcher.rb
require 'net/http'
class PageFetcher
def fetch(url)
@response = Net::HTTP.get_response URI(url)
Response.new @response
end
class Response
def initialize(response)
View spec.rb
# Collaboration test...
describe Client do
it 'calls a_method on a server' do
client = Client.new
server = double 'server'
expect(server).to receive(:a_method).with(1, 2).and_return 3
client.do_it(server)
end
end
@patmaddox
patmaddox / new_note.scpt
Last active May 27, 2018
applescript to make a new markdown note in DEVONthink and open it in an editor
View new_note.scpt
display dialog "Name your note..." default answer ""
set theName to text returned of result
tell application id "DNtp"
set theID to "F76B0AC1-6B7B-45A2-ADE6-8514F54671F4"
set theGroup to get record with uuid theID
set theRecord to create record with {name:theName, type:markdown, content:"# " & theName} in theGroup
set theFile to path of theRecord as POSIX file
tell application "Finder" to open theFile
end tell
@patmaddox
patmaddox / protected.rb
Created Mar 28, 2017
label every protected method
View protected.rb
class FunkyTown
def time_to
end
def get_funky
end
protected
def get_down
end
View hey.txt
-----BEGIN PGP MESSAGE-----
Comment: https://keybase.io/download
Version: Keybase Go 1.0.18 (darwin)
wcFMA0Z6TywPIg7/ARAA3GULm6t+fjmgWM34mi7craURuls9sYJ8JjfwUpfLMtsi
99LnaKAUC/XWPxO+LAx/q1pcGRUGO7LfkaLIUS8g617ZEioi4RBMuseOksxh/eFL
5tZsJtZCJZ2BJmttCdsmA9zSd4Bo9lhIwh6axJ4BZ1aS4BYksXAwQNfkL8CwffJT
iuDG/smfTjOYhKGCFIugBIJbDM7/fEaOP/XBg+tV9OSxcTO8XS3GDI8D/aPW9dq/
1x9v1KsUscqqfDrn/8Vl0JFuXnqk/VUIrzL0tGnSJrkWrBAmfkvOISu2zHYxwPA2
Yr3cPVN+bmf5CJG63hZbq2HQ1aI4FLDmB5K/T07V4Bu5wZAMSAy7iYlsv24HXCI0
View keybase.md

Keybase proof

I hereby claim:

  • I am patmaddox on github.
  • I am patmaddox (https://keybase.io/patmaddox) on keybase.
  • I have a public key ASCiUFAnZKZdY6C-lhts6ejpm_CAKfP-a1GBAKp2MzJ-Wwo

To claim this, I am signing this object:

@patmaddox
patmaddox / Dockerfile
Created Jan 12, 2017
Using personal SSH keys on docker container (OS X)
View Dockerfile
RUN mkdir ~/.ssh
RUN echo 'IdentityFile ~/.ssh-local/id_rsa' > ~/.ssh/config
@patmaddox
patmaddox / 1.md
Created Oct 4, 2016
salary questions
View 1.md

One of the reasons that i want to learn Ruby is because the salary seems to be higher than a php developer does get. Currently i'm developing php based open source ecommerce extensions, and it is far under a junior ruby developer get. Hopefully you are willing to point me the correct direction as my starting point. Thanks a lot.

@patmaddox
patmaddox / interpolate.sh
Last active Oct 3, 2016
Scripts to make Falcon wavetable audio files
View interpolate.sh
#!/usr/bin/env bash
# This takes two input files and creates an
# interpolated wavetable between them
# No warranty on this – backup your files first!
#
# Make the shell file executable, and then run it
# to see usage
#
@patmaddox
patmaddox / chicken_wings.md
Created Aug 19, 2016
my awesome chicken wings
View chicken_wings.md

Chicken wings

I made some chicken wings tonight. Usually for the sauce I start with Frank's hot sauce and doctor it up a bit, but today I made a more custom sauce... the first time I've really done that.

Wings

  • pre-heat oven to 400, place a cast iron skillet inside
  • pat wings dry with napkins
You can’t perform that action at this time.