Skip to content

Instantly share code, notes, and snippets.

Avatar

Iori ONDA iorionda

  • Freelance
  • Tokyo/Japan
View GitHub Profile
@iorionda
iorionda / changelog-memo.el
Created May 31, 2011
ChangeLog save on my Dropbox
View changelog-memo.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ChangeLog Memo
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun memo()
(interactive)
(setq memo-file-path "~/Dropbox/memo/ChangeLogMemo.txt")
(add-change-log-entry
nil
(expand-file-name memo-file-path)))
(global-set-key "\C-cm" 'memo)
View skk.c.patch
diff -ruN ~/src/uim-1.7.1/uim/skk.c.orig ~/src/uim-1.7.1/uim/skk.c > skk.c.patch
--- skk.c.orig 2011-11-01 17:35:59.000000000 +0900
+++ skk.c 2011-11-01 17:41:16.000000000 +0900
@@ -797,7 +797,8 @@
uim_asprintf(&idx, "%s%c", s, okuri_head);
- fprintf(wserv, "1%s \n", idx);
+ // fprintf(wserv, "1%s \n", idx);
+ fprintf(wserv, "1%s", idx);
View uim-fep.c.patch
diff -ruN ~/src/uim-1.7.1/fep/uim-fep.c.orig ~/src/uim-1.7.1/fep/uim-fep.c
--- uim-fep.c.orig 2011-11-01 17:53:18.000000000 +0900
+++ uim-fep.c 2011-11-01 17:53:47.000000000 +0900
@@ -382,7 +382,7 @@
}
if (gnu_screen) {
- g_opt.status_type = BACKTICK;
+ // g_opt.status_type = BACKTICK;
s_master = PROC_FILENO;
View gdbm.rb.patch
diff -ruN /usr/local/Library/Formula/gdbm.rb.orig /usr/local/Library/Formula/gdbm.rb.new
--- /usr/local/Library/Formula/gdbm.rb.orig 2011-12-01 03:01:55.000000000 +0900
+++ /usr/local/Library/Formula/gdbm.rb 2011-12-01 03:02:45.000000000 +0900
@@ -1,7 +1,7 @@
require 'formula'
class Gdbm < Formula
- url 'http://ftpmirror.gnu.org/gdbm/gdbm-1.9.1.tar.gz'
+ url 'ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.9.1.tar.gz'
homepage 'http://www.gnu.org/software/gdbm/'
View toggle-close-pair.vim
function! ClosePairOn()
let b:closepair = 0
inoremap [ []<Left>
inoremap { {}<Left>
inoremap ( ()<Left>
inoremap " ""<Left>
inoremap ' ''<Left>
inoremap ` ``<Left>
endfunction
View subprocess.py.patch
diff -ruN subprocess.py subprocess.py.new > subprocess.py.patch
--- subprocess.py 2011-12-15 18:32:27.000000000 +0900
+++ subprocess.py.new 2011-12-15 18:33:05.000000000 +0900
@@ -32,7 +32,7 @@
setattr(self, attr, wrapped_pipe)
__init__.__doc__ = subprocess_orig.Popen.__init__.__doc__
- def wait(self, check_interval=0.01):
+ def wait(self, check_interval=0.01, timeout=None):
# Instead of a blocking OS call, this version of wait() uses logic
@iorionda
iorionda / tmux_ssh.sh
Created Feb 15, 2012
tmux_ssh, man_ssh
View tmux_ssh.sh
# terminalの中でsshしたら新しいwindowを作成する
if [ "$TERM" = "screen-256color-bce" ];then
function ssh_tmux() {
eval server=\${$#}
tmux new-window -n $@ "exec ssh $@"
}
alias ssh=ssh_tmux
fi
# terminalの中でmanをしたら新しいpainを作成する
View python2.6 for homebrew
require 'formula'
<<-COMMENTS
This is the Homebrew formula for Python.
Versions
--------
This formula is currently tracking version 2.6.x.
View normalize_dict.py
NORMALIZE_MAP = [
(u'ヴァ', u'ば'),
(u'ヴぁ', u'ば'),
(u'ヴィ', u'び'),
(u'ヴぃ', u'び'),
(u'ヴェ', u'べ'),
(u'ヴぇ', u'べ'),
(u'ヴォ', u'ぼ'),
(u'ヴぉ', u'ぼ'),
(u'ヴ', u'ぶ'),
@iorionda
iorionda / sendmail.py
Created May 22, 2012
send email and not use smtplib and email
View sendmail.py
#!/usr/local/bin/python
# -*- coding:utf-8 -*-
import os
SENDMAIL_LOCATION = "/var/qmail/bin/sendmail"
def send(sender, receivers, subject, body, encoding):
p = os.popen("%s -t" % SENDMAIL_LOCATION, "w")
p.write("From: %s\n" % sender)