This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'zendesk_api' | |
require 'active_support' | |
require 'active_support/core_ext' | |
# https://github.com/zendesk/zendesk_api_client_rb/issues/175 | |
module ZendeskAPI | |
class Article < Resource; end | |
class Section < Resource; end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aptible/auth' | |
require 'aptible/api' | |
HANDLE = 'your-app' | |
EMAIL = '[email protected]' | |
PASSWORD = '' | |
token = Aptible::Auth::Token.create(email: EMAIL, password: PASSWORD) | |
app = Aptible::Api::App.all(token: token).find do |app| | |
app.handle == HANDLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# gem install -N zendesk_api | |
require 'zendesk_api' | |
require 'truncate_html' | |
require 'active_support' | |
require 'active_support/core_ext' | |
require 'cgi' | |
require 'erb' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Usage: ruby slack-notifications-sync.rb aptible event [event event ...] | |
# Supported events: | |
# * commit_comment | |
# * create | |
# * delete | |
# * deployment | |
# * deployment_status | |
# * download | |
# * follow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +fancyremarker is my Bitcoin username. You can send me #bitcoin here: https://onename.io/fancyremarker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |