This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mechanize' | |
class PapaOrder | |
SN_URL = 'https://order.papajohns.com/secure/signin/frame.html?destination=' | |
attr_reader :agent, :password, :email | |
def initialize(email, password) | |
@email, @password = email, password | |
@agent = Mechanize.new |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am j-wilkins on github. | |
* I am jwilkins (https://keybase.io/jwilkins) on keybase. | |
* I have a public key whose fingerprint is 52C8 9629 A40E 5FCF B7D3 CE53 A3A6 3447 C2C0 B9BD | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catspam() { | |
curl -vvvv -d "{\"Body\":\"${1}\"}" -H "Content-Type: application/json" http://catspammer.com/api/cat | |
say "meow" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/query.rb:20:in `sanitized_text' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/google.rb:40:in `query_url_google_params' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/google.rb:57:in `query_url_params' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/base.rb:128:in `url_query_string' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/google.rb:16:in `query_url' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/base.rb:139:in `cache_key' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/base.rb:200:in `fetch_raw_data' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/base.rb:166:in `fetch_data' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/google.rb:22:in `results' | |
/ruby-2.0.0-p247@global/gems/geocoder-1.1.8/lib/geocoder/lookups/base.rb:44:in `search' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class TmuxMacosxPasteboard < Formula | |
homepage 'https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard' | |
url 'https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/archive/v2.0.tar.gz' | |
sha1 'bf9342ccc1240f628fcfab887d99a61ff701446f' | |
def install | |
system 'make' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = Redis::Namespace.new(:resque, redis: Redis.new) | |
# the 'correct' way. Redis wants us to specify the keys we'll be operating | |
# on in the script as an argument to the eval command. | |
script = <<-LUA | |
local t = {} | |
for iter,value in ipairs(KEYS) do | |
table.insert(t, {value, redis.call('llen', value)}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from pdf-writer example by j-wilkins | |
#-- | |
# PDF::Writer for Ruby. | |
# http://rubyforge.org/projects/ruby-pdf/ | |
# Copyright 2003 - 2005 Austin Ziegler. | |
# | |
# Licensed under a MIT-style licence. See LICENCE in the main distribution | |
# for full licensing information. | |
# | |
# $Id: pac.rb,v 1.4.2.1 2005/08/25 03:38:05 austin Exp $ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
bind-key C-a last-window | |
# keep lots of scrollback | |
set -g history-limit 1000000 | |
# Set status bar | |
#set -g status-bg black | |
#set -g status-fg gray |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A stupid example that shows nothing aside from the fact that SHA1 is fast. it's probably documented much more | |
thoroughly elsewhere. | |
The gist is this: we take approximately 100000 file paths, see how long it takes to loop through them purely for | |
comparison, then we see how long it takes to hash all 100000, then we go through and compare the string file paths | |
to an arbitrary string file path, and finally we go through and compare the hashed file path to a hashed arbitrary | |
file path. | |
The general results showing that, while the SHA1 does take significantly more time than a straight loop, it is still | |
fairly minuscule < .5 seconds. while you wouldn't want to be SHA1'ing 100000 file paths all the time, if you had to, |
NewerOlder