Skip to content

Instantly share code, notes, and snippets.

@horimislime
horimislime / fb_jk_scroll.user.js
Created December 6, 2011 14:12
Scrolls Facebook wall posts with j/k key
// ==UserScript==
// @name fb_jk_scroll
// @version 0.1
// @description Scrolls wall posts with j/k key
// @include http://www.facebook.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
// ==/UserScript==
$(document).ready(function(){
@horimislime
horimislime / dmm_nobuttons.user.js
Created December 18, 2011 15:48
Removes Facebook Like & Google+1 buttons from dmm.com
// ==UserScript==
// @name dmm_nobuttons
// @version 0.1
// @description Removes Facebook Like & Google+1 buttons from dmm.com
// @include http://*dmm.*/*
// ==/UserScript==
(function() {
var ignoreTags=["fb-like","g-plusone"];
@horimislime
horimislime / ldr_open_entry_w_v.user.js
Created December 21, 2011 08:32
Opens selected entry on LDR with "v" key in another tab
// ==UserScript==
// @name ldr_open_entry_w_v
// @include http://reader.livedoor.com/reader/*
// @version 0.1
// ==/UserScript==
window.addEventListener("load", function() {
with(unsafeWindow){
Keybind.remove("v");
Keybind.add('v', function(){
@horimislime
horimislime / do-your-work.py
Created April 14, 2012 07:21
指定したアプリケーション以外が一定時間アクティブだとgrowl通知する
#!/usr/bin/python
#!-*-coding:utf-8-*-
import sched,time
import gntp.notifier
from AppKit import NSWorkspace
CHECK_INTERVAL=10 #Seconds
ALLOW_NAME=["iTerm","Emacs","Preview"]
@horimislime
horimislime / .gitconfig
Created April 15, 2012 08:59
過去のコミットとの差分をlatexdiffで出力する設定
[difftool.latex]
cmd = ~/bin/git-latexdiff "$LOCAL" "$REMOTE"
[difftool]
prompt = false
[alias]
ldiff = difftool -t latex
@horimislime
horimislime / git-latexdiff
Created April 15, 2012 09:03
Gitからlatexdiffするためのシェルスクリプト
#!/bin/bash
case $2 in
contents/*.tex)
latexdiff -e utf8 "$1" "$2" > "$2".diff
echo Finished writing diff to "$2".diff
;;
esac
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
public class HitAndBlow{
private List<Integer> hiddenNumber;
private int length;
private int tryCount;
@horimislime
horimislime / tunes-alarm.py
Created June 3, 2012 14:31
指定時間にiTunesのプレイリストを再生する
#-*-coding:utf-8-*-
#Usage: python tunes-alarm.py -t "2012-06-04 07:00:00" -p "Playlist"
import sched, time
import datetime
import os
from optparse import OptionParser
def playTunes(playlist):
script = """osascript -e '
@horimislime
horimislime / tunes-alarm.py
Created August 11, 2012 22:29
指定時間にiTunesのプレイリストを再生する
#-*-coding:utf-8-*-
#Usage: python tunes-alarm.py -t "2012-06-04 07:00:00" -p "Playlist"
import sched, time
import datetime
import os
from optparse import OptionParser
def playTunes(playlist):
script = """osascript -e '
@horimislime
horimislime / git-latexdiff
Created August 11, 2012 22:31
Gitからlatexdiffするためのシェルスクリプト
#!/bin/bash
case $2 in
contents/*.tex)
latexdiff -e utf8 "$1" "$2" > "$2".diff
echo Finished writing diff to "$2".diff
;;
esac