Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Untitled</title>
<link href="/stylesheets/application.css?1271719139" media="screen" rel="stylesheet" type="text/css" />
<script src="/javascripts/prototype.js?1271182621" type="text/javascript"></script>
<script src="/javascripts/effects.js?1271182621" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1271182621" type="text/javascript"></script>
<script src="/javascripts/controls.js?1271182621" type="text/javascript"></script>
@flsafe
flsafe / wc10.html
Created September 16, 2010 04:39 — forked from nithinbekal/wc10.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>World Cup 2010 Countdown Timer</title>
</head>
<body>
<div id="worldcup_countdown_time"> </div>
<script src="wc10.js" type="text/javascript" charset="utf-8"></script>
@flsafe
flsafe / gist:752446
Created December 23, 2010 02:04
Output of `bundle list`
Gems included by the bundle:
* ZenTest (4.4.2)
* actionmailer (2.3.5)
* actionpack (2.3.5)
* activerecord (2.3.5)
* activeresource (2.3.5)
* activesupport (2.3.5)
* acts-as-taggable-on (2.0.6)
* authlogic (2.1.6)
* builder (3.0.0)
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <ctype.h>
#define N_UNIT_TESTS 1
#define MAX_YAML_LEN 1024
#define INDENT 4
COMMON_WORDS = []
desc 'Move buisnesses to one sub category to another'
task :move_businesses, [:from, :to, :heuristic_file] => :environment do |t, args|
puts args
if valid_arguments?(args)
read_heuristic_file(args[:heuristic_file])
move_businesses(args[:from], args[:to])
else
print_usage
Lawn 416
Landscape 341
Landscaping 286
Svc 224
Care 178
Maintenance 60
Gardening 53
Tree 52
Service 45
Garden 37
'Edward Tootle Lawn Care' 'Entertainment/Movie Distribution' '78202' ["Entertainment"]/["Movie Distribution"]
'Propertymax' 'Entertainment/Movie Distribution' '78202' ["Entertainment"]/["Movie Distribution"]
'NDC Landscape Contracting' 'Entertainment/Movie Distribution' '78204' ["Entertainment"]/["Movie Distribution"]
'Vincent Landscapes' 'House and Home/Movie Distribution' '78204' ["Entertainment"]/["Movie Distribution"]
'Marty Murie's Nativescapes' 'House and Home/Movie Distribution' '78204' ["Entertainment"]/["Movie Distribution"]
'Austin Lawn & Garden' 'House and Home/Movie Distribution' '78206' ["Entertainment"]/["Movie Distribution"]
'Wee Care Landscapes Inc' 'House and Home/Movie Distribution' '78204' ["Entertainment"]/["Movie Distribution"]
'Skippers Stanley S&J Lawn Car' 'Entertainment/Movie Distribution' '78202' ["Entertainment"]/["Movie Distribution"]
'Jacques Landscaping' 'Entertainment/Movie Distribution' '78204' ["Entertainment"]/["Movie Distribution"]
'Woodland Nursery Ctr' 'Entertainment/Movie
LAWN_CARE_SIC = "0782"
def get_sic_code(sic)
SicCode.first(sic_code:sic)
end
def fix_lawn_care_sic
sic_code = get_sic_code(LAWN_CARE_SIC)
sic_code.category = GCS::Category.first_by_title('lawn-and-garden')
sic_code.sub_category = GCS::SubCategory.first_by_title('lawn-care')
SOAP request: https://gateway.cygnustrack.com/Gateway.asmx
SOAPAction: "http://YourDomainName.com/PostDeviceMessage", Content-Type: text/xml;charset=UTF-8, Content-Length: 1013
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://YourDomainName.com/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><PostDeviceMessage><apiKey>c7e91427-0bbc-47a0-be99-14f4a1d161f1</apiKey><xmlMessage>&lt;LocationMessage&gt;
&lt;DeviceId&gt;80c96863-1e37-4&lt;/DeviceId&gt;
&lt;UtcDateTime&gt;2011-08-12 05:50:17 UTC&lt;/UtcDateTime&gt;
&lt;Longitude&gt;31.75497188353929&lt;/Longitude&gt;
&lt;Latitude&gt;-106.4933316389852&lt;/Latitude&gt;
&lt;GpsAccuracyInMeters&gt;20&lt;/GpsAccuracyInMeters&gt;
&lt;AltitudeInMeters&gt;0&lt;/AltitudeInMeters&gt;
&lt;SpeedInKph&gt;10&lt;/SpeedInKph&gt;
-106.4930386454095,31.75567039469036,0
-106.4933067789597,31.75559907548127,0
-106.4935185215678,31.7555546939303,0
-106.4937444379161,31.75548291296306,0
-106.4936977010694,31.75529720909734,0
-106.4935596464942,31.75511143605309,0
-106.4935513241208,31.75509688691311,0
-106.4933316389852,31.75497188353929,0
-106.4930651746005,31.75477986665801,0
-106.492657129873,31.75461401608551,0