Skip to content

Instantly share code, notes, and snippets.

View fancyremarker's full-sized avatar

Frank Macreery fancyremarker

  • Aptible
  • Catskill Mountains
View GitHub Profile
@fancyremarker
fancyremarker / forecast.io.css
Created February 12, 2014 15:30
My Stylebot styles
span.inner {
display: none;
}
@fancyremarker
fancyremarker / README.md
Created February 12, 2014 16:15
My Artblock Plus filters

I use these filters with ArtBlock but they will also work with Adblock Plus.

The idea is to use Adblock's default filter lists to block all ads, but to whitelist certain assets necessary for the proper functioning of interactive sites.

@fancyremarker
fancyremarker / Gemfile
Created February 27, 2014 22:04
Demonstration of header caching bug in HyperResource
gem 'sinatra'
gem 'hyperresource'
@fancyremarker
fancyremarker / momentum-todo.rb
Created June 19, 2014 23:09
Load Momentum TODO list from a text file
#!/usr/bin/env ruby
require 'sqlite3'
require 'json'
require 'securerandom'
EXTENSION_ID = 'laookkfknpbbblfpciffpaejjkokdgca'
DBFILE = "#{ENV['HOME']}/Library/Application Support/Google/Chrome/Default/" \
"Local Storage/chrome-extension_#{EXTENSION_ID}_0.localstorage"
@fancyremarker
fancyremarker / check-unread-chats.rb
Last active August 29, 2015 14:03
check-unread-chats
#!/usr/bin/env ruby
require 'net/http'
require 'nokogiri'
require 'yaml'
def credential_pairs_from_yaml
YAML.load(File.open("#{ENV['HOME']}/.google-credentials.yml"))
rescue
{}
@fancyremarker
fancyremarker / onename.txt
Created August 17, 2014 19:41
Onename Verification
Verifying that +fancyremarker is my Bitcoin username. You can send me #bitcoin here: https://onename.io/fancyremarker
@fancyremarker
fancyremarker / team-sync.rb
Last active August 29, 2015 14:06
Sync a (non-Owners) GitHub team with all org repos
#!/usr/bin/env ruby
# Usage: ruby team-sync.rb aptible team
require 'octokit'
org_login = ARGV[0]
team_slug = ARGV[1]
print 'Username: '
username = $stdin.gets.chomp
@fancyremarker
fancyremarker / huboard-cleanup.rb
Created December 3, 2014 15:24
Script to clean up HuBoard labels (e.g., for moving to Waffle)
#!/usr/bin/env ruby
# Usage: ruby huboard-cleanup.rb ORG_HANDLE
require 'octokit'
org_login = ARGV[0]
events = ARGV[1..-1]
print 'Username: '
username = $stdin.gets.chomp
@fancyremarker
fancyremarker / catskills-filter.rb
Created December 26, 2014 02:11
Filter NYS DEC trail maps to a given map circle (e.g., Catskills Region)
#!/usr/bin/env ruby
# Run on http://www.dec.ny.gov/maps/hikingtrailslink.kmz
# Also: to get rid of waypoints, leaving only routes
# sed -i 's/<MultiGeometry><Point>.*/<MultiGeometry>/' OUTFILE
require 'openssl'
require 'geokit'
INPUT = ARGV[0]
@fancyremarker
fancyremarker / print-container-host-port.rb
Created February 18, 2015 20:56
[:octopus:] Grab an app container's internal host and port from the Aptible API
require 'aptible/auth'
require 'aptible/api'
HANDLE = 'your-app'
EMAIL = 'you@example.com'
PASSWORD = ''
token = Aptible::Auth::Token.create(email: EMAIL, password: PASSWORD)
app = Aptible::Api::App.all(token: token).find do |app|
app.handle == HANDLE