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
{ | |
"name": "Default color scheme", | |
"groups": { | |
"background": { "fg": "white", "bg": "gray2" }, | |
"background:divider": { "fg": "gray6", "bg": "gray2" }, | |
"mode": { "fg": "darkestgreen", "bg": "brightgreen", "attr": ["bold"] }, | |
"modified_indicator": { "fg": "brightyellow", "bg": "gray4", "attr": ["bold"] }, | |
"paste_indicator": { "fg": "white", "bg": "mediumorange", "attr": ["bold"] }, | |
"readonly_indicator": { "fg": "gray6", "bg": "gray4" }, | |
"branch": { "fg": "gray9", "bg": "gray4" }, |
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
{ | |
"default_module": "powerline.segments.common", | |
"segment_data": { | |
"uptime": { | |
"before": "⇑ " | |
}, | |
"external_ip": { | |
"before": "ⓦ " | |
}, | |
"date": { |
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
{ | |
"segment_data": { | |
"branch": { | |
"before": " " | |
}, | |
"modified_indicator": { | |
"args": { "text": "+" } | |
}, | |
"line_percent": { | |
"args": { "gradient": false }, |
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
{ | |
"common": { | |
"term_truecolor": false, | |
"dividers": { | |
"left": { | |
"hard": " ", | |
"soft": " " | |
}, | |
"right": { | |
"hard": " ", |
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 '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' |
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 '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" |
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
<!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 { |
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 '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)) |
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
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" |
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/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 |