Skip to content

Instantly share code, notes, and snippets.

View stevedev's full-sized avatar

Steve Thompson stevedev

View GitHub Profile
A total of 62 ROBOTS were logged
Mozilla/5.0 (compatible; Blekkobot; ScoutJet; +http://blekko.com/about/blekkobot) 1 Time(s)
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) 169 Time(s)
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (FlipboardProxy/1.1; +http://flipboard.com/browserproxy) 1 Time(s)
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0; ips-agent) Gecko/20100101 Firefox/14.0.1 2 Time(s)
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1; 360Spider 4 Time(s)
Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07) 10 Time(s)
Twitterbot/1.0 4 Time(s)
Mozilla/5.0 (compatible; coccoc/1.0; +http://help.coccoc.com/) 9 Time(s)
Mozilla/5.0 (compatible; CareerBot/1.1; +http://www.career-x.de/bot.html) 3 Time(s)
@stevedev
stevedev / gist:9624630
Created March 18, 2014 17:13
double specs, how does it work!?!?
11:12:49 - INFO - Running: spec/models/news_spec.rb
Run options: exclude {:integration=>true, :pdf=>true}
.........
Finished in 0.1104 seconds
9 examples, 0 failures
Coverage report Rcov style generated for RSpec to /Users/sthompson/Sites/ag/coverage/rcov
Run options: exclude {:integration=>true, :pdf=>true}
.........
@stevedev
stevedev / gist:a08fd663fc9390f0b12f
Created June 6, 2014 23:03
Get centroid for polygon in Google Maps
google.maps.Polygon::getArea = ->
points = @getPaths()
area = 0
i = 0
j = points.length - 1
while i < points.length
point1 = points[i]
@stevedev
stevedev / poly_center.coffee.js
Created June 18, 2014 16:14
Google Maps Polygon Center
google.maps.Polygon::Center = ->
PI = 22 / 7
X = 0
Y = 0
Z = 0
@getPath().forEach (vertex, inex) ->
lat1 = vertex.lat()
lon1 = vertex.lng()
lat1 = lat1 * PI / 180
lon1 = lon1 * PI / 180
root@staging:/etc/nginx# nginx -V
nginx version: nginx/1.1.19
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-auth-pam --add-module=/build/buildd/n

Home Page Priorities:

  • Product Sample:

    • allows buyers to see product in their area right away
    • shows that we are serious and have listings
    • demonstrates quality and type of product
  • Builder Onboarding:

    • Why list on NHLS?
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="380" version="1.1" width="670" style="overflow: hidden; position: relative; left: -0.328125px;" viewBox="0 0 670 380" preserveAspectRatio="xMinYMin">
<desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Rapha&#xEB;l 2.1.2</desc>
<defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"/>
<rect x="0" y="0" width="670" height="410" r="0" rx="0" ry="0" fill="#ffffff" stroke="#ffffff" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"/>
<image x="0" y="0" width="670" height="380" preserveAspectRatio="none" xlink:href="data:image/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAFeCAYAAABZ12FcAAAAGXRFWHRTb2Z0&#10;d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9i&#10;ZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2Vo&#10;aUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6&#10;bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0&#10;LjE0MDk0
def generate_unique_token
self.confirmation_token = loop do
random_token = SecureRandom.urlsafe_base64(nil, false)
break random_token unless User.exists?(confirmation_token: random_token)
end
end
-# email :string(255) default(""), not null
-# encrypted_password :string(255) default(""), not null
-# reset_password_token :string(255)
+# email :string default(""), not null
+# encrypted_password :string default(""), not null
+# reset_password_token :string