Skip to content

Instantly share code, notes, and snippets.

View ckdake's full-sized avatar

Chris Kelly ckdake

View GitHub Profile
import time
import board
import digitalio
import web
status = False
relay = digitalio.DigitalInOut(board.D26)
relay.direction = digitalio.Direction.OUTPUT
relay.value = False
@ckdake
ckdake / README.md
Created May 1, 2020 16:57
Export from Automatic

Automatic.com is shutting down their connected car tracking device and service, and there isn't a one-button data export!

You'll need a few things to get your trip data out:

https://developer.automatic.com/

  1. Sign up for an app, name it whatever you like.
  2. Generate a test token and save this, generate the "OAuth Authorize URL", and go there to get an OAuth authorization code
  3. Create the "Example CURL for OAuth Access Token", paste in your OAuth auth code, and run it. save your 'access token'

install the 'automatic-client' and 'json' gem.

@ckdake
ckdake / .cloudflare
Created July 25, 2016 13:37
helping cloudflare and certbot get along.
CLOUDFLARE_USER=example@example.com
CLOUDFLARE_KEY=probablyshoulduseyourapikeyhereinstead
@ckdake
ckdake / Rules.rb
Last active August 29, 2015 14:03
nanoc fancyness
#!/usr/bin/env ruby
# A few helpful tips about the Rules file:
#
# * The string given to #compile and #route are matching patterns for
# identifiers--not for paths. Therefore, you can’t match on extension.
#
# * The order of rules is important: for each item, only the first matching
# rule is applied.
#
@ckdake
ckdake / gallery2flickr.rb
Last active April 30, 2019 21:51
Import your Gallery 2 g2data dir into Flickr
# This takes your g2data albums directory (run it from inside g2data) and makes sets on flickr containing all the photos
# They are set to private so you can make sure everything is looking good before sharing with the world
require 'flickraw'
FlickRaw.api_key=ENV['flickr-api-key']
FlickRaw.shared_secret=ENV['flickr-api-secret']
# token = flickr.get_request_token
<?php
$config = array(
'db_host' => 'localhost',
'db_user' => 'root',
'db_pass' => '',
'system_name' => `hostname`,
'send_mail' => TRUE, // TRUE to send e-mails, FALSE to operate silently
'mail_to' => 'root@localhost', // comma-separated list of e-mail addresses
@ckdake
ckdake / nerdiestthingsofalltime.csv
Last active August 29, 2015 13:56
Top 10 Nerdiest Things Of All Time list from a handful of people at Big Nerd Ranch
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 10 columns, instead of 7. in line 6.
Dwarf Fortress,Dwarf Fortress,Dwarf Fortress,Dwarf Fortress,Dwarf Fortress,Dwarf Fortress,Tabletop RPGs,Dwarf Fortress,Dwarf Fortress,Dwarf Fortress
Pokemon,Star Wars,Ardiuno,Eclipse,Xcode,Android,Nerd Ranches,Bill Gates,Steve Balmer,Aaron Hillegass
Nethack,Dungeons and Dragons,MUDs,LARPing,Calculator watches,Comics,CCGs,MMORPGs,Lightning bolt! Lightning bolt!,There are only 10 types of people...
Nerdiest Things Of All Time Surverys,LARP,Dungeons and Dragons,Coding for Commodore 64,Programming your own TI-82 Games,Cosplay,John Carmack,Steve Wosniak,Misfired High Five,Short sleeved plaid shirts
Magic,Astronomy,Mathematics,Physics,Science Fiction,Electronics,Computers,Programming,Philosophy,Woodworking
Singh's Mac OS X Internals book,Fountain pens,Molecular gastronomy,Indo-European poetics,Derridean post-structuralism,New Hacker's Dictionary / The Jargon File,Hacker's Delight,Napier's bones,Proust,Medieval alchemical manuscripts
LARPing,Whirlyball Bachelor Parties,FaerieCon,Reenactments,Code Golf,Pale Skin,Coll
@ckdake
ckdake / csv2map.py
Created April 24, 2012 13:53
Google Earth KML to a heathamp
import heatmap # http://jjguy.com/heatmap/
import random
import csv
if __name__ == "__main__":
pts = []
for point in csv.reader(open('coords.csv')):
pts.append((float(point[0]), float(point[1])))
print "Processing %d points..." % len(pts)
@ckdake
ckdake / Gemfile
Created November 3, 2011 18:38
Rails 3.1 Assets on S3 with HTTPS
gem 'fog' # Storage on S3 for carrierwave
gem 'rmagick' # Resizes images and makes thumbnails
gem 'carrierwave' # Image attachments, newer version doesn't work with local files preview hack
gem 'asset_sync' # Syncs assets to S3
@ckdake
ckdake / Procfile
Created October 14, 2011 19:47
Scaling Search
web: bundle exec rails server thin -p $PORT
worker: bundle exec rake jobs:work
memcached: bundle exec memcached -m 64
solr: bundle exec rake sunspot:solr:run