Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name MouseHunt Horn bot
// @namespace adachinko
// @include http://apps.facebook.com/mousehunt/index.php
// @include http://apps.facebook.com/mousehunt/
// ==/UserScript==
(function() {
function getFirstElementByXPath(xpath, node) {
var node = node || document
import sys
import time
import traceback
import select
from eventlet.support import greenlets as greenlet
from eventlet.hubs.hub import BaseHub, FdListener, READ, WRITE
WAIT_TIMER_INDENT = 0x10001234
import select, errno, os, time, signal
import Utils, Scripting, Logs, Build, Node, Options
def daemon(ctx):
"""rebuild as soon as something changes"""
bld = None
while True:
try:
bld = Utils.g_module.build_context()
// ==UserScript==
// @name enable contextmenu
// @namespace adachinko
// @include http://www.nikkei.com/*
// ==/UserScript==
unsafeWindow.$('body').unbind('contextmenu');
try:
import pyfsevents
except ImportError:
raise
else:
class FSEventDirWatch(DirWatch):
def __init__(self):
pass
def wait(self, bld):
@shnjp
shnjp / tunnel.py
Created March 5, 2011 06:29
ssh tunnel for Fabric
"""
Fabric tunneling utilities
by shn@glucose.jp
class ForwardServer and relates things are refere Robey Pointer's paramiko example.
(http://bazaar.launchpad.net/~robey/paramiko/trunk/annotate/head%3A/demos/forward.py)
usage::
with make_tunnel('user@192.168.0.2:10022') as t:
@shnjp
shnjp / .zshrc
Created April 4, 2011 12:12
ぼくのzshrc. どこから持ってきたんだっけ…
#
autoload -U compinit
autoload -Uz vcs_info
autoload -U colors
colors
compinit
setopt auto_pushd
setopt correct
@shnjp
shnjp / mufufu-profile.mobileconfig
Created October 6, 2012 16:35
構成Profileテスト
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>FullScreen</key>
<true/>
"""
uwsgiのエントリポイントの中でコレを実行すれば、ファイルに変更があった時にリロードする。
"""
import uwsgi
from uwsgidecorators import timer
from werkzeug.serving import _iter_module_files, _log
import os
# TODO: uwsgi.optsから読み込む
class Fluent::UDPInput < Fluent::Input
Fluent::Plugin.register_input('udp_formatted', self)
config_param :port, :integer, :default => 5050
config_param :bind, :string, :default => '127.0.0.1'
config_param :tag, :string
def configure(conf)
super