Skip to content

Instantly share code, notes, and snippets.

View ckdake's full-sized avatar

Chris Kelly ckdake

View GitHub Profile
@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
@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 / .cloudflare
Created July 25, 2016 13:37
helping cloudflare and certbot get along.
[email protected]
CLOUDFLARE_KEY=probablyshoulduseyourapikeyhereinstead
@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.

import time
import board
import digitalio
import web
status = False
relay = digitalio.DigitalInOut(board.D26)
relay.direction = digitalio.Direction.OUTPUT
relay.value = False