Skip to content

Instantly share code, notes, and snippets.

View kingcu's full-sized avatar

Cullen King kingcu

View GitHub Profile
2013 675R, clean title one owner.
Full Hindle Evo exhaust
BMC race filter
Bazzaz with two maps: premium pump and U4.4 race fuel. Currently set to pump. 126rwhp on U4.4
Rectifier/Regulator mounted in tail w/ Triumph factory race kit
Charcoal canister delete
SAI blockoff
Sharkskinz race body work (OEM bodywork included, light road rash on right side)
Woodcraft clipons
[global]
auth cluster required = none
auth service required = none
auth client required = none
auth supported = none
fsid = 234C6825-0E2B-4256-A710-71D29F4F023E
max open files = 131072
osd pool default pg num = 512
osd pool default pgp num = 512
osd pool default size = 3
after_save :save_log_entries
def save_log_entries
return unless @log_entries
@log_entries.each { |e| e.save }
@log_entries = []
end
#in change_subscription method.....
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="Garmin Connect"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <metadata>
<link href="connect.garmin.com">
<text>Garmin Connect</text>
</link>
<time>2012-01-12T01:15:30.000Z</time>
@kingcu
kingcu / gist:1552738
Created January 3, 2012 00:13
nominatim loaddata modification for memory savings
CREATE OR REPLACE FUNCTION load_this_shit() RETURNS integer AS $$
DECLARE
rec place%rowtype;
BEGIN
FOR rec in SELECT * FROM place WHERE osm_type IN ('N', 'W', 'R') LOOP
EXECUTE 'INSERT INTO placex values ('
|| quote_nullable(rec.place_id) || ','
|| quote_nullable(rec.osm_type) || ','
|| quote_nullable(rec.osm_id) || ','
|| quote_nullable(rec.class) || ','
puts "before normalized_path.size"
if @normalized_path.size > 0
if @normalized_path.size > 2 #remember, using x,y concurrently in same array, so this means we have more than 1 point
larger = @width < @height ? @height : @width
stroke_width = (larger < 300 ? 1 : (larger >= 300 and larger < 600) ? 2 : 3)
gc = Draw.new
gc.stroke(stroke_color)
gc.stroke_width(stroke_width)
gc.fill_opacity(0)
gc.polyline(*@normalized_path)
@kingcu
kingcu / tyler.rb
Created October 28, 2011 18:05
Charles Proxy dump parser for Tyler
#run this file by typing 'ruby tyler.rb' on your command line.
#make sure the tyler_garbage_data.txt file is in the same directory,
#and that you are also in that directory on your command line.
#
#A project for you would be to figure out how to pass the ruby
#script the garbage data file on teh command line, so you can
#have it named whatever.
#
#Finally, to capture the output of this script, you'll want to
#execute it with something like
@kingcu
kingcu / gist:1222374
Created September 16, 2011 15:31
TXT records not in place
kingcu@desktop:~/ridewithgps$ nslookup -q=TXT _domainkey.yhamail.org.uk
Server: 192.168.0.1
Address: 192.168.0.1#53
** server can't find _domainkey.yhamail.org.uk: NXDOMAIN
kingcu@desktop:~/ridewithgps$ nslookup -q=TXT mail._domainkey.yhamail.org.uk
Server: 192.168.0.1
Address: 192.168.0.1#53
kingcu@desktop:~/ridewithgps$ nslookup -q=txt _domainkey.ridewithgps.com
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
_domainkey.ridewithgps.com text = "t=y\; o=-"
Authoritative answers can be found from:
kingcu@desktop:~/ridewithgps$ nslookup -q=txt mail._domainkey.ridewithgps.com
@kingcu
kingcu / gist:1133690
Created August 9, 2011 09:53
Bad POST with no form data
0000 00 22 15 85 ca b9 00 0e a6 99 ed 22 08 00 45 20 ."...... ..."..E
0010 01 21 3a 23 40 00 2e 06 18 49 d9 a8 5e f2 c0 a8 .!:#@... .I..^...
0020 00 08 c6 b7 0b b8 a7 db c6 c5 17 34 89 79 80 18 ........ ...4.y..
0030 ff ff ba 1d 00 00 01 01 08 0a 15 2a eb 43 0f 47 ........ ...*.C.G
0040 0c de 50 4f 53 54 20 2f 75 73 65 72 73 2e 6a 73 ..POST / users.js
0050 6f 6e 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 on HTTP/ 1.1..Hos
0060 74 3a 20 68 6f 62 62 65 7a 2e 6e 65 74 3a 33 30 t: hobbe z.net:30
0070 30 30 0d 0a 41 63 63 65 70 74 2d 45 6e 63 6f 64 00..Acce pt-Encod
0080 69 6e 67 3a 20 67 7a 69 70 0d 0a 58 2d 52 65 71 ing: gzi p..X-Req
0090 75 65 73 74 65 64 2d 57 69 74 68 3a 20 58 4d 4c uested-W ith: XML