Skip to content

Instantly share code, notes, and snippets.

@xulapp
xulapp / update.py
Created March 21, 2011 11:14
MPC HomeCinema installer
# coding: utf-8
import os
import re
import urllib
import urlparse
import locale
locale.setlocale(locale.LC_ALL, '')
pageurl = 'http://xhmikosr.1f0.de/index.php?folder=bXBjLWhj'
@xulapp
xulapp / optjpg.bat
Created March 11, 2011 13:31
jpegtran
@echo off
:mainloop
if "%~1" == "" goto :eof
call :optimize "%~1"
shift
goto :mainloop
:optimize
set a=%~a1
@xulapp
xulapp / dropInputFileName.uc.js
Created February 12, 2011 14:25
dropInputFileName.uc.js
// ==UserScript==
// @name dropInputFileName.uc.js
// @description
// @include main
// @charset utf-8
// @compatibility Firefox 3.6+
// @namespace http://twitter.com/xulapp
// @author xulapp
// @license MIT License
// @version 2011/02/12 23:00 +09:00
@xulapp
xulapp / unalert.user.js
Created January 23, 2011 05:21
unalert is dom based alert dialog
// ==UserScript==
// @name unalert
// @description dom based alert dialog
// @include http://www.nicovideo.jp/*
// @charset utf-8
// @compatibility Firefox
// @namespace http://twitter.com/xulapp
// @author xulapp
// @license MIT License
// @version 2011/01/23 14:20 +09:00
var Div = Class({
constructor: function Div() {
if (!(this instanceof Div))
return Div.createInstance(arguments);
this.element = this.cursor = document.createElement('div');
this.stack = [];
},
attr: function attr(name, value) {
this.cursor.setAttribute(name, value);
@xulapp
xulapp / tail_recursive.js
Created January 18, 2011 14:19
tail recursive
function tailRecursive(func) {
var firstcall = true;
var targs;
var CONTINUE = {};
return function() {
var args = arguments;
var err, threw;
if (firstcall) {
@xulapp
xulapp / grsc.user.js
Created December 25, 2010 03:58
Google Reader Subscribers Count mod
// ==UserScript==
// @name Google Reader Subscribers Count mod
// @description Show how many subscribers to the feed with google reader.
// @include http:*
// @exclude http://www.google.tld/reader/view/*
// @charset utf-8
// @compatibility Firefox
// @namespace http://twitter.com/xulapp
// @author xulapp
// @license MIT License
@xulapp
xulapp / p2Watcher.uc.js
Created December 4, 2010 04:07
p2Watcher.uc.js
// ==UserScript==
// @name p2Watcher.uc.js
// @description
// @include main
// @charset utf-8
// @compatibility Firefox
// @namespace http://twitter.com/xulapp
// @author xulapp
// @license MIT License
// @version 2011/02/19 00:50 +09:00
@xulapp
xulapp / middleClickFocusTab.uc.js
Created November 11, 2010 14:01
long middle click == shift + middle click
// ==UserScript==
// @name middleClickFocusTab.uc.js
// @description long middle click == shift + middle click
// @include main
// @charset utf-8
// @compatibility Firefox 3.6+
// @namespace http://twitter.com/xulapp
// @author xulapp
// @license MIT License
// @version 2010/11/22 00:50 +09:00
@xulapp
xulapp / jstmpl.js
Created October 27, 2010 17:14
JS テンプレートエンジン
(function() {
var quote = (function() {
var specialCharReg = /[\n\r'\\]/g;
var specialCharMap = {'\n': '\\n', '\r': '\\r', '\'': '\\\'', '\\': '\\\\'};
var specialCharRegCb = function(c) { return specialCharMap[c]; };
return function(str) {
return '\'' + str.replace(specialCharReg, specialCharRegCb) + '\'';
};
})();