I hereby claim:
- I am dtinth on github.
- I am dtinth (https://keybase.io/dtinth) on keybase.
- I have a public key whose fingerprint is 9D6F F952 88E9 EB76 F123 910D B957 3A77 A413 0BB4
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'growl' | |
loop { Growl.notify('Press the remote control', | |
name: 'press_remote'); sleep 14.5 * 60 } |
#! /usr/bin/python | |
""" | |
This simple script makes it easy to create server certificates | |
that are signed by your own Certificate Authority. | |
Mostly, this script just automates the workflow explained | |
in http://www.tc.umn.edu/~brams006/selfsign.html. | |
Before using this script, you'll need to create a private |
s = Time.now | |
wc = `pbpaste | wc -w`.to_i | |
print "#{wc} words" | |
gets | |
t = (Time.now - s).to_i | |
puts "#{t} seconds" | |
puts "#{wc * 60 / t} wpm" |
require 'osaka' | |
require 'growl' | |
def get_player_position | |
Osaka::ScriptRunner.execute(%q(tell application "iTunes" to get the player position)).to_f | |
end | |
def get_track_description | |
Osaka::ScriptRunner.execute(%q(tell application "iTunes" to get the current track's long description)) |
<!DOCTYPE html><meta charset=utf-8> | |
<style> | |
body { padding: 0; margin: 0; } | |
#outer { | |
width: 1632px; height: 1224px; | |
color: white; background: black; | |
font: bold 192px/1.3 Helvetica Neue, sans-serif; | |
position: relative; | |
} | |
#inner { |
require 'base64' | |
require 'erb' | |
title, subtitle, *text, image_number = ARGV | |
output_file = "image%02d.cover.png" % [image_number.to_i] | |
html = ERB.new(File.read('title.template.html.erb')).result(binding) | |
data_url = "data:text/html;base64,#{Base64.strict_encode64(html)}" | |
RASTERIZE = "/usr/local/share/phantomjs/examples/rasterize.js" |
require 'watir-webdriver' | |
puts "== Album Description Updater ==" | |
description = File.read(ARGV[0]) | |
parts = description.scan(/https:\/\/www\.facebook\.com\/.*?\/media_set\S+/) | |
puts "There are #{parts.length} albums whose descriptions are to be updated!" | |
browser = Watir::Browser.new :firefox, :profile => 'watir' |
{ | |
"common": { | |
"term_truecolor": false, | |
"dividers": { | |
"left": { | |
"hard": " ", | |
"soft": " " | |
}, | |
"right": { | |
"hard": " ", |
{ | |
"segment_data": { | |
"branch": { | |
"before": " " | |
}, | |
"modified_indicator": { | |
"args": { "text": "+" } | |
}, | |
"line_percent": { | |
"args": { "gradient": false }, |