Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<head><title>Emulate fuba_recorder image conversion using canvas</title></head>
<body></body>
<script type="application/x-javascript">
var sources = [
'./bg_01.jpg',
'./bg_02.jpg',
'./bg_03.jpg',
'./bg_04.jpg',
// ==UserScript==
// @name gist: replace title with filename
// @namespace http://d.hatena.ne.jp/youpy/
// @include http://gist.github.com/*
// @exclude http://gist.github.com/gists
// @require http://gist.github.com/3242.txt
// ==/UserScript==
(function() {
var username = $X('id("owner")//a')[0].textContent;
#!/bin/sh
cd /Applications/Google\ Chrome.app/Contents/MacOS
if [ ! -f Chrome.bin ]; then
mv Google\ Chrome Chrome.bin
fi
echo '#!/bin/sh' > Google\ Chrome
echo '/Applications/Google\ Chrome.app/Contents/MacOS/Chrome.bin --enable-webgl --no-sandbox' >> Google\ Chrome
chmod 755 Google\ Chrome
#!/usr/bin/env ruby
# Usage: ./foursquare-teleportation.rb [vid [shout]]
require 'open-uri'
require 'net/http'
require 'uri'
email = '[email protected]'
password = 'your-password'
// ==UserScript==
// @name Aspie's web
// @namespace http://aspietribe.com/
// @include http://userscripts.org/*
// ==/UserScript==
var s = unsafeWindow.jQuery('#footer-content .disclaim')[0];
s.innerHTML = s.innerHTML.replace(/your/, "aspie's");
<!doctype html>
<html>
<head>
<title>patterns</title>
<meta charset="utf-8">
<style type="text/css">
body {
text-align: center;
}
#x {
<!doctype html>
<html>
<head>
<title>patterns</title>
<meta charset="utf-8">
<style type="text/css">
body {
text-align: center;
}
#x {
#!/usr/bin/env ruby
# Usage: ./translator.rb -t yi あれ、今日日食?
require 'ubygems'
require 'grope'
require 'optparse'
@env = Grope::Env.new
@env.load 'http://translate.google.com/'
// ==UserScript==
// @name ตัด เลือก
// @namespace http://aspietribe.com/
// @include http://translate.google.com/*
// ==/UserScript==
// Inspired by this glitch <http://gist.github.com/330379>.
['old_tl','old_sl'].forEach(function(e) {
var s = document.getElementById(e);
s.style.cssText ='position:absolute; width:auto;';
s.addEventListener('mousedown', function() {
diff --git a/lib/grope/web_resource_load_delegate.rb b/lib/grope/web_resource_load_delegate.rb
index c4abaa7..b270781 100644
--- a/lib/grope/web_resource_load_delegate.rb
+++ b/lib/grope/web_resource_load_delegate.rb
@@ -82,4 +82,7 @@ class NSHTTPCookieWrapper
def expires
cookie.expiresDate && Time.at(cookie.expiresDate.timeIntervalSince1970.to_i)
end
+
+ alias :expired? :expires