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 noun_type_destination = new CmdUtils.NounType( "destination", ['clipboard', 'selected text', 'displayed message'] ); | |
CmdUtils.CreateCommand({ | |
name: "get-pinyin", | |
takes: {"Hanzi to read as PinYin": noun_arb_text}, | |
preview: function(pblock, hanzi) { | |
searchHanzi = jQuery.trim(hanzi.text); | |
if (searchHanzi.length < 1) { | |
pblock.innerHTML = "Gets the <b>Pinyin reading</b> of selected Chinese characters."; |
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
# Generates a series of substitution cipher puzzles. The messages to | |
# "encrypt" are take from a text file passed on the command-line, | |
# where each message is on one line. | |
# | |
# The output is a PDF, "codes.pdf". | |
# | |
# Forked from Jamis Buck's http://gist.github.com/58141 | |
# changed to show code as numbers instead of letters and a hint of solution instead of the key. | |
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
# from http://snippets.dzone.com/posts/show/5609 | |
class String | |
def translit | |
ActiveSupport::Multibyte::Handlers::UTF8Handler.normalize(self,:d).split(//u).reject { |e| e.length > 1 }.join | |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>Sliding Frames</title> | |
<meta name="warning" content="HC SVNT DRACONES" /> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/reset/reset-min.css" /> | |
<style type="text/css"> | |
div#container { overflow: hidden; visibility: hidden; } | |
div#navigation { position: absolute; top: 10px; left: 10px; } |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>Scaling Background</title> | |
<meta name="warning" content="HC SVNT DRACONES" /> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/reset/reset-min.css" /> | |
<style type="text/css"> | |
div#container { position: relative; z-index: 3; color: white; } | |
div#scale { position: absolute; top: 0; left: 0; z-index: 2; overflow: hidden; } |
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
// ==UserScript== | |
// @name IHardlyKnowHer | |
// @namespace http://emanuelcarnevale.com | |
// @include http://flickr.com/* | |
// @include http://www.flickr.com/* | |
// @exclude http://www.flickr.com/photos/friends/* | |
// ==/UserScript== | |
function get(url, cb) { | |
GM_xmlhttpRequest({ | |
method: "GET", |
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 noun_type_destination = new CmdUtils.NounType( "destination", ['clipboard', 'selected text', 'displayed message'] ); | |
CmdUtils.CreateCommand({ | |
name: "lmgtfy", | |
takes: {"Something you have to search about because your friends are lazy": noun_arb_text}, | |
preview: function(pblock, query) { | |
searchQuery = jQuery.trim(query.text); | |
if (searchQuery.length < 1) { | |
pblock.innerHTML = "Gives you a link to a lmgtfy.com search."; |
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
require "net/http" | |
require "uri" | |
base_url = 'www.instapaper.com' | |
path_url = '/api/authenticate/' | |
username = 'instatest' | |
pwd = '' | |
#1st version |
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[0] | |
puts 'Usage: newpost "the post title"' | |
exit(-1) | |
end | |
date_prefix = Time.now.strftime("%Y-%m-%d") | |
postname = ARGV[0].strip.downcase.gsub(/ /, '-') | |
post = "/Users/al3x/src/al3x.github.com/_posts/#{date_prefix}-#{postname}.textile" |
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
# Back up your iTunes library to S3 | |
git clone git://github.com/sstephenson/mackerel.git | |
ruby -rubygems mackerel/examples/itunes_backup.rb amazon-s3://YOUR_ACCESS_KEY_ID:YOUR_SECRET_ACCESS_KEY@s3.amazonaws.com/YOUR_BUCKET_NAME/itunes.mackerel |