Skip to content

Instantly share code, notes, and snippets.

View iorionda's full-sized avatar

Iori ONDA iorionda

  • Freelance
  • Tokyo/Japan
View GitHub Profile
@iorionda
iorionda / changelog-memo.el
Created May 31, 2011 00:41
ChangeLog save on my Dropbox
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 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)
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);
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;
@iorionda
iorionda / gdbm.rb.patch
Created November 30, 2011 18:18
for gdbm install
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/'
function! ClosePairOn()
let b:closepair = 0
inoremap [ []<Left>
inoremap { {}<Left>
inoremap ( ()<Left>
inoremap " ""<Left>
inoremap ' ''<Left>
inoremap ` ``<Left>
endfunction
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 February 15, 2012 05:32
tmux_ssh, man_ssh
# 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を作成する
require 'formula'
<<-COMMENTS
This is the Homebrew formula for Python.
Versions
--------
This formula is currently tracking version 2.6.x.
@iorionda
iorionda / normalize_dict.py
Created March 5, 2012 15:43
normalize_map
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 07:41
send email and not use smtplib and email
#!/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)