git rsif 'REPLACE-FROM' 'REPLACE-WITH'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Query page javascript for the identifier "name", and call callback(value), | |
// when found, or undefined, if not found or some error occurred. This works | |
// only for values that can be JSON serialized -- numbers, strings, booleans, | |
// null, or nested structures like Arrays and Objects that only contain above | |
// mentioned types of data. | |
function queryContentVar(name, callback) { | |
// makes a random 20-char lowercase id | |
function random() { | |
var rand = ''; | |
while (rand.length < 20) |
I just want the stickers. :-) (Original)
I was looking for two clean,
tiny and elegant element-to-xpath functions
producing short and complete xpaths like
id("main")/ul/li[3]
or
/html/body/ul/li[3]
for a given element,
and figured I'd just craft my own.
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/perl | |
use strict; | |
use warnings; | |
use Getopt::Std; | |
use File::Basename; | |
use JSON; | |
use utf8; | |
my $prog = basename($0); |
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/ruby | |
require 'digest/md5' | |
require 'net/http' | |
require 'uri' | |
$unknown_gravatar = 'd5fe5cbcc31cff5f8ac010db72eb000c' | |
$email_addr_regex = /[^\[{(< @"']+@[^\]})> @"']+\.[^\]})> @"']+/ | |
def md5(str) |
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
// Enumerate your own list of goog.require:s, if you want something else than TableSorter and XhrIo. | |
// Similarly, you can pass a callback that will get the library in its first parameter, once loaded, | |
// or leave it as is, if you'd rather overwrite the top window's "goog" with your own custom version. | |
javascript:(function(requires, callback) { | |
var base = 'http://closure-library.googlecode.com/svn/trunk/closure/goog/' | |
, iframe = document.body.appendChild(document.createElement('iframe')); | |
iframe.src = 'about:blank'; | |
iframe.style.display = 'none'; | |
iframe.contentWindow.cb = callback; | |
iframe.contentDocument.write('<head><script src="'+ base +'base.js"></script><script src="'+ base + |
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 steps = 0 // steps drawn on the current element, so far | |
, info = document.getElementById('next_step') | |
, svgs = [].slice.call(document.getElementsByTagName('svg')) | |
, svg, walker, current; | |
function lexSVGPath(d) { | |
function command(seg) { | |
var cmd = seg.match(/[a-z]/i), arg, cnt; | |
if (cmd) { | |
cmd = cmd[0]; // which subcommand |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.