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
############################################################################### | |
## Mobify Apache Redirect Plugin v1.1 ## | |
## http://mobify.me ## | |
## ## | |
## Installation: ## | |
## ## | |
## First: for this to work, you need to configure a mobile site for ## | |
## yourself using Mobify. Then follow the CNAME setup instructions for ## | |
## pointing m.yoursite.com to your Mobify account: ## | |
## http://support.mobify.me/faqs/general/dns ## |
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
const Name = 'gatherer', | |
Gatherer = 'http://gatherer.wizards.com/', | |
Base = '<style>'+ <![CDATA[ | |
.error {font-style:oblique; line-height:1.8} | |
.logo {display:inline-block; max-width:100%} | |
.logo > img {border:none; max-width:100%} | |
.loading + .logo {opacity:0.4} | |
.error + .logo {opacity:0.7} | |
]]> +'</style>'+ | |
<div class={Name}><div id={Name}> </div |
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 gist logs | |
// @namespace http://d.hatena.ne.jp/murky-satyr | |
// @description Shows commit logs on Gist in Opera | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
(function($, reHref, reLines) { | |
$ && $('.id').each(function(i, me) { |
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
/* jquery.tinydb - jQuery interface to TinyDB (http://tinydb.org/) | |
* Copyright (c) 2008 Chris Moyer ([email protected]) | |
* | |
* usage: | |
* jQuery.tinydb.read(tinydb_id, callback); | |
* callback is called with the data from TinyDB | |
* | |
* jQuery.tinydb.write({key: val, key2: val2}, callback); | |
* write data, callback is called with tinydb_id string | |
* |
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
function Benchmarker(count, args, that) { | |
if (Object.prototype.toString.call(args) != '[object Array]') args = [args]; | |
function toArray() { | |
var name, results = this.results, array = []; | |
for (name in results) { | |
array.push(name + ': ' + results[name]); | |
} | |
return array; | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!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" > | |
<head> | |
<!-- | |
Thanks to all contributors: Ayush, shoust | |
--> | |
<title>...</title> | |
<style type="text/css" media="screen,projection,tv,handheld,print,speech"> | |
html, 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
@echo off | |
git init | |
REM safety first: just in case we're in another repository | |
echo..svn>.gitignore | |
echo..hg>>.gitignore | |
git add . | |
git commit -m "initial commit" |
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
Database = Class.create({ | |
initialize: function(tableName) { | |
this.tableName = tableName; | |
this.db = openDatabase("Database Name", "1.0", "Display Name", 10000); | |
}, | |
handleFirstTimers: function(firstTimeCallback, everyOtherTimeCallback) { | |
this.db.transaction(function(tx) { | |
tx.executeSql("CREATE TABLE IF NOT EXISTS " + this.tableName + " (flag REAL)",[], function(tx, result) { | |
tx.executeSql("SELECT flag FROM " + this.tableName, [], function(tx, result) { |
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
String.format = (function(slice) { | |
return function(template) { | |
var args = slice.call(arguments, 1), i = args.length; | |
while (i--) { | |
template = template.replace(new RegExp('\\{' + i + '\\}', 'g'), args[i]); | |
} | |
return template; | |
}; | |
})(Array.prototype.slice); |
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
/* | |
This is a simplified sample of an idea I had today inspired by the fab | |
project. Event loops currently suck... so I've built this wonky DSL for you. | |
I'll release a real library later that actually implements some not so easy | |
things. | |
*/ |