Skip to content

Instantly share code, notes, and snippets.

Timothy tspangler

Block or report user

Report or block tspangler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tspangler
tspangler / airlines.json
Created May 15, 2019
Airlines with ICAO code and country of origin
View airlines.json
[{
"icao": "EVY",
"carrier": "34 Squadron, Royal Australian Air Force",
"country": "Australia"
}, {
"icao": "RNX",
"carrier": "1Time Airline",
"country": "South Africa"
}, {
"icao": "TTF",
@tspangler
tspangler / gsp.svg
Last active Dec 10, 2018
Garden State Parkway shield
View gsp.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tspangler
tspangler / maximize.rb
Created Oct 22, 2018
Look for a window and maximize it when found
View maximize.rb
# `gem install win32-window` first
require 'win32/window'
puts "Searching for Notepad window..."
window = nil
loop do
window = Window.find(title: /Notepad/)
break unless window.empty?
View gist:bca7457f70cde9257042409691fcd1f0
Find: gem '(.*?)'(.*)\n?
Replace: \1\n
@tspangler
tspangler / gist:ccf1c56e1f8d1012af76a56ed03225e7
Created Dec 29, 2017
Parse output of `bundle outdated`
View gist:ccf1c56e1f8d1012af76a56ed03225e7
Find: ^(.+) \(newest ([A-Za-z0-9\s\.]+), installed ([0-9\.]+).*\n
Replace: \1,\2,\3\n
This will take the output of `bundle outdated` and create a comma-delimited list in this format:
`gem_name,bundle_version,newest_version`
@tspangler
tspangler / gist:4485306
Created Jan 8, 2013
Convert ugly CamelCase model schemas to lcase and underscores. Input: User(id: integer, FirstName: string, LastName: string, StreetAddress: string, City: string, State: string, Zip: string, PhoneNumber: string, EmailAddress: string, created_at: datetime, updated_at: datetime) Output: rails g scaffold User id:integer first_name:string last_name:s…
View gist:4485306
# encoding: utf-8
puts 'What should I name the model?'
model_name = gets
puts 'Enter model schema:'
sch = gets.match(/\((.*)\)/)[1]
puts 'Analyzing schema string...'
scaffold_string = 'rails g scaffold {replace_me}'
@tspangler
tspangler / gist:1612731
Created Jan 14, 2012
#VegasTech's message to our representatives
View gist:1612731
NOTES
- The immediate threat seems to be PIPA in the senate, and since we're constituents of the most influential man in the senate, we'll start with Reid.
- What about Dean Heller?
- SOPA is just as bad. We have to talk to Shelley Berkley too.
- Amending the bill to take out the DNS blocking provisions isn't good enough.
View Unknown mob packet
2011-04-05 18:30:58.437 server --> <0x18: mob_spawn [1203831, 51, -31053, 1440, -678, 43, 0, [0]]>
----------------------------------------------------
0000 18 00 0f 11 7c 5f ff ff 8c 11 00 00 08 60 00 00
0001 03 32 11 00 91 00 09 53 6e 75 73 47 6f 6f 73 65
0002 00 00 10 05 52 00 00 00 14 7f 18 00 12 5f e9 34
0003 ff ff 91 00 00 00 02 40 ff ff f6 45 12 00 00 00
0004 7f 18 00 12 5f 9b 32 ff ff 88 39 00 00 05 80 ff
0005 ff fd ea 3b 00 00 00 10 ff 7f 03 00 0c c2 a7 35
0006 c2 a7 36 c2 a7 34 c2 a7 35 03 00 18 c2 a7 63 57
0007 65 6c 63 6f 6d 65 2c 20 64 61 72 6b 69 73 6d c2
View no wonder!
simsonique:ruby Tim$ ruby hpricot.rb
./hpricot.rb:4: undefined method `Hpricot' for main:Object (NoMethodError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from hpricot.rb:2
simsonique:ruby Tim$ mv hpricot.rb not_hpricot.rb
simsonique:ruby Tim$ ruby not_hpricot.rb
simsonique:ruby Tim$
View Sample EAC log (for new prebetas)
Exact Audio Copy V0.99 prebeta 5 from 4. May 2009
EAC extraction logfile from 22. September 2009, 0:41
Flogging Molly / Float
Used drive : SONY DVD RW DRU-800A Adapter: 1 ID: 0
Read mode : Secure
Utilize accurate stream : Yes
You can’t perform that action at this time.