Skip to content

Instantly share code, notes, and snippets.

View yaotti's full-sized avatar

Hiroshige Umino yaotti

View GitHub Profile
// ==UserScript==
// @name mixi echo theme saver
// @namespace http://www.yaotti.net
// @include http://mixi.jp/recent_echo.pl
// ==/UserScript==
(function(){
var area = unsafeWindow.document.getElementById("EchoComment");
function onFocus() {
area.style.color="black";
#!/usr/bin/env python
#coding: utf8
class Page:
"""
インスタンス変数
rank: PageRank
tolinks: そのページが指すページオブジェクトのリスト
クラス変数
;; for Carbon Emacs
;; print font size
(defun change-print-font-size ()
(interactive)
(let ((new-font-size
(read-number (format "font-size(current: %d): "
mac-print-font-size))))
(setq mac-print-font-size new-font-size)))
;; perl tidy
;; http://blog.nqou.net/2006/11/20225449.html
(defun perltidy-region ()
"Run perltidy on the current region."
(interactive)
(save-excursion
(shell-command-on-region (point) (mark) "perltidy -q" nil t)))
(defun perltidy-defun ()
"Run perltidy on the current defun."
(interactive)
;;; perlのskelton用設定
;; templateを利用する
;; cf. http://www.bookshelf.jp/soft/meadow_37.html
;; 利用するかどうかは言語ごとに設定
(require 'autoinsert)
(setq auto-insert-directory "~/.emacs.d/skelton/") ;; ~/.emacs.d/skelton/にskeltonファイルを置く
(auto-insert-mode 1)
(setq auto-insert-query nil)
;; 拡張子が.tのファイルを開いたときにskel.test.plの内容を挿入
#!/usr/bin/env perl
#
# hgk.pl - Hatena Group Keyword Writer.
#
# Copyright (C) 2009 by Hiroshige Umino.
# <[email protected]>
#
# Special thanks to:
# - Hiroshi Yuki http://www.hyuki.com/techinfo/hatena_diary_writer.html
#
(require 'typing-outputz)
(global-typing-outputz-mode t)
(add-to-list 'typing-outputz-counted-commands
'skk-insert)
(setq typing-outputz-key
(caddr (split-string
(shell-command-to-string
(mapconcat 'identity '("pit" "get" "outputz.com") " ")))))
#!/usr/bin/env perl
use strict;
use warnings;
use AnyEvent::Twitter::Stream;
use Config::Pit;
my $config = pit_get("twitter.com");
my $cv = AnyEvent->condvar;
#!/usr/bin/env perl
use strict;
use warnings;
use WebService::Simple;
my ( $refname, $oldrev, $newrev ) = @ARGV;
my $format = "%cn: %s";
chomp( my $msg = `git log -1 --pretty=format:"$format" $oldrev..$newrev` );
"" feedSomeKey.js
autocmd LocationChange .* :fmapc
"" Gmail
js <<EOF
autocommands.add('LocationChange',/mail\.google\.com\/(mail|a)\//,[
'js plugins.feedKey.setup(',
'"c / y j k n p o u e x s r a # * [ ] z ? gi gs gt gd ga gc gl".split(/ +/).map(function(i) [i, "4" + i])',
');'
].join(''));
EOF