This file contains 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 "base64" | |
if ARGV[0].nil? | |
puts "Usage: #{$0} <name.css>" | |
exit 1 | |
end | |
lines = File.readlines(ARGV[0]) | |
font = {} |
This file contains 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 | |
# Get the source for woff2sfnt from http://people.mozilla.org/~jkew/woff/woff-code-latest.zip | |
unless ARGV.empty? | |
ARGV.each do |filename| | |
if filename[-4..-1] == 'woff' | |
`woff2sfnt #{filename} > #{filename[0...-4]}otf` | |
end | |
end |
This file contains 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 'open-uri' | |
require 'rubygems' | |
require 'active_support' | |
account = 'thijs' | |
max_id = 18216684927 | |
File.open("#{account}.txt", 'w') do |f| | |
loop do |
This file contains 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> | |
<html> | |
<head> | |
<title>Spinner</title> | |
<meta charset="utf-8"> | |
<style> | |
canvas, a { display: block; } | |
</style> | |
</head> | |
<body> |
This file contains 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> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="zepto_original.js"></script> | |
</head> | |
<body> | |
<div id="canvas"><div id="slide1"><img></div></div> | |
<script> | |
var slide = $('#slide1'); |
This file contains 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
© 1999 Bob. Anyone may use this work without restrictions as long | |
as this paragraph is included. The work is provided “as is”, | |
without warranty of any kind. |
This file contains 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 | |
unless ARGV.empty? | |
ARGV.each do |filename| | |
`pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB #{filename} #{filename}.stripped` | |
`mv #{filename}.stripped #{filename}` | |
`touch #{filename}` | |
end | |
else | |
p "Usage: #{$0} filename" |
This file contains 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
process do |files| | |
execute("osascript -e 'tell application \"WebKit\" | |
do JavaScript \"window.location.reload()\" in first document | |
end tell'") | |
end |
This file contains 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
var start = 'touchstart', move = 'touchmove', end = 'touchend'; | |
if (!device.hasTouch) { start = 'mousedown'; move = 'mousemove'; end = 'mouseup'; } | |
element.addEventListener(start, this.ontouchstart.bind(this), false); | |
element.addEventListener(move, this.ontouchmove.bind(this), false); | |
element.addEventListener(end, this.ontouchend.bind(this), false); | |
element.addEventListener('touchcancel', this.ontouchcancel.bind(this), false); |
This file contains 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
Object.prototype.collect = function(callback) { | |
var result = []; | |
for (var key in this) { | |
if (this.hasOwnProperty(key)) { | |
result.push(callback(this[key], key)); | |
} | |
} | |
return result; | |
}; |
OlderNewer