Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @id googlereaderautochangestartpage@http://twitter.com/xulapp
// @name Google Reader Auto Change Start Page
// @version 1.0
// @namespace http://twitter.com/xulapp
// @author xulapp
// @description
// @include http://www.google.tld/reader/view/*
// @include https://www.google.tld/reader/view/*
// @run-at document-start
@xulapp
xulapp / highlight_selector.html
Created May 1, 2012 15:18 — forked from teramako/highlight_selector.html
CSS ソースのセレクタ部分をハイライトする
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Highlight Selector</title>
<style id="style">
body > p {
background-color: #DDD;
padding: 0.5em;
}
@xulapp
xulapp / nyaruko.htm
Created April 18, 2012 14:40
(」・ω・)」うー!(/・ω・)/にゃー!
<body id="B" onload=setInterval('t=new(Date)/210&31;B.innerHTML=28<t?"Let\'s\(・ω・)/にゃー!":["(」・ω・)」うー!","(/・ω・)/にゃー!"][19<t?1:t/4&1]',4)>
# coding: utf-8
import sys
import os
class NullDevice:
def write(self, s):
pass
_stderr = sys.stderr
@xulapp
xulapp / google_reader_all_feed_refresh.user.js
Created December 1, 2011 12:25
Google Reader All Feed Refresh
// ==UserScript==
// @id google-reader-all-feed-refresh@http://twitter.com/xulapp
// @name Google Reader All Feed Refresh
// @description すべてのフィードを強制的に更新させます
// @include http://www.google.tld/reader/view/*
// @include https://www.google.tld/reader/view/*
// @charset utf-8
// @run-at document-end
// @namespace http://twitter.com/xulapp
// @author xulapp
@xulapp
xulapp / デフォルトファビコンが○○に見えて困る.htm
Created November 16, 2011 14:04
デフォルトファビコンが○○に見えて困る
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>デフォルトファビコンが○○に見えて困る</title>
<style>
.item {
display: table-row;
}
.item > label,
@xulapp
xulapp / fx_textbox_length.htm
Created October 1, 2011 02:17
number of characters
<input onkeyup="this.nextSibling.textContent=this.value.length"><b></b><br>
<textarea onkeyup="this.nextSibling.textContent=this.value.length"></textarea><b></b>
@xulapp
xulapp / lightsout_w5.htm
Created September 21, 2011 15:18
Lights Out in 213 bytes
<body id=B onload="a=f=function(n,_,g){a^=(1<<n)*67.515625;for(j=30;j;B.innerHTML=g?_:'Great!!')_+=j--%6?(a>>j&1?g='●':'○').link('javascript:f('+j+',++c)'):'<br>'};for(i=30;i;)i--%6&Math.random(c=0)<.5&&f(i)">
@xulapp
xulapp / parallel.py
Created August 27, 2011 14:07
parallel
def parallel(tasks):
from threading import Thread
def target(i, task):
results[i] = task()
threads = [Thread(target=target, args=args) for args in enumerate(tasks)]
results = [None] * len(tasks)
for thread in threads:
@xulapp
xulapp / bat.cfg
Created August 27, 2011 10:30
otbedit bat config
// language setttings for DOS Batch file
KeywordNocase:TRUE
KeywordFile:bat.txt
OpenComment:
CloseComment:
RowComment:::
BreakChars: !"%&().<=>\|
OperatorChars:&<=>|
BracketChars:)
QuoteChars:"