Skip to content

Instantly share code, notes, and snippets.

@false-git
false-git / patch-src_coding.c
Created June 17, 2011 01:20
emacs23.3でカーソルキーを使うと位置がずれる問題に対応するpatch
--- src/coding.c.orig 2011-01-09 02:45:14.000000000 +0900
+++ src/coding.c 2011-06-17 09:45:43.000000000 +0900
@@ -3867,8 +3867,14 @@
else
charset = CHARSET_FROM_ID (charset_id_3);
ONE_MORE_BYTE (c1);
- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0))
- goto invalid_code;
+ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) {
+ if (c1 < 0x20 || c1 >= 0x80)
@false-git
false-git / .emacs
Created April 9, 2012 03:23
org-modeの設定
;; org-mode, rememberの設定
(condition-case err
(progn
(require 'org)
(setq org-directory "~/org") ; link to ~/Dropbox/org
(setq org-default-notes-file (concat org-directory "/notes.org"))
(setq remember-data-file org-default-notes-file)
(setq org-mobile-inbox-for-pull (concat org-directory "/flagged.org"))
(setq org-mobile-directory "~/Dropbox/MobileOrg/")
(setq org-agenda-files (list org-default-notes-file org-mobile-inbox-for-pull (concat org-directory "/memo.org")))
@false-git
false-git / org.rb
Created April 9, 2012 03:36
homebrew用org-modeの野良Formula
require 'formula'
class Org < Formula
homepage ''
url 'http://orgmode.org/org-7.8.08.tar.gz'
md5 '1ba73757d176e66b02cccf1c23616621'
def install
system "make Emacs=~/Applications/Emacs.app/Contents/MacOS/Emacs install"
end
diff --git a/Makefile b/Makefile
index c282d3b..9b607dd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+CFLAGS += -I/usr/local/include -L/usr/local/lib
+
all: urftopdf
urftopdf:urftopdf.c unirast.h
@false-git
false-git / graphs.inc.php.patch
Created June 15, 2013 22:58
zabbix2 のグラフの文字化け対策
*** graphs.inc.php.orig Sat Jun 15 23:17:46 2013
--- graphs.inc.php Sun Jun 16 07:54:35 2013
***************
*** 666,671 ****
--- 666,674 ----
imagettftext($image, $fontsize, $angle, $x, $y, $color, $ttf, $string);
}
elseif ($angle == 0) {
+ if ($gdinfo['JIS-mapped Japanese Font Support']){
+ $string = mb_convert_encoding($string, "SJIS", "UTF-8");
@false-git
false-git / bsd.port.mk.patch
Created August 22, 2013 09:09
FreeBSD8のportsで、ライブラリの依存関係チェックに失敗する問題の暫定パッチ
*** bsd.port.mk.orig Mon Aug 19 22:56:16 2013
--- bsd.port.mk Mon Aug 19 23:02:28 2013
***************
*** 5025,5031 ****
for libdir in $$dirs; do \
test -f $${libdir}/$${lib} || continue; \
if [ -x /usr/bin/file ]; then \
! [ `file -b -L --mime-type $${libdir}/$${lib}` = "application/x-sharedlib" ] || continue ; \
fi ; \
found=1 ; \
@false-git
false-git / system.log
Created November 16, 2013 18:48
どこでもMy Mac設定ありで、InsomniaXのDisable Lid Sleep状態で蓋を閉じたMacBook Proのログ抜粋
Nov 17 00:45:15 mbp2011 kernel[0]: hibernate_write_image done(0)
Nov 17 00:45:15 mbp2011 kernel[0]: sleep
Nov 17 00:45:15 mbp2011 kernel[0]: Wake reason: RTC (Alarm)
Nov 17 00:45:15 mbp2011 kernel[0]: AirPort_Brcm43xx::powerChange: System Wake - Full Wake/ Dark Wake / Maintenance wake
Nov 17 00:46:30 mbp2011 kernel[0]: hibernate_write_image done(0)
Nov 17 00:46:30 mbp2011 kernel[0]: sleep
Nov 17 00:46:30 mbp2011 kernel[0]: Wake reason: RTC (Alarm)
Nov 17 02:33:27 mbp2011 kernel[0]: AirPort_Brcm43xx::powerChange: System Wake - Full Wake/ Dark Wake / Maintenance wake
Nov 17 02:34:42 mbp2011 kernel[0]: hibernate_write_image done(0)
Nov 17 02:34:42 mbp2011 kernel[0]: sleep
@false-git
false-git / local.launchd.conf.plist
Created December 6, 2013 14:28
ログイン時に、~/.launchd.conf を読ませる設定
<?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>Label</key>
<string>local.launchd.conf</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
@false-git
false-git / man.patch
Created January 7, 2014 01:34
FreeBSD 9 のmanを日本語対応するパッチ
*** /usr/bin/man Sat Dec 21 23:16:42 2013
--- /usr/local/bin/man Tue Jan 7 09:57:10 2014
***************
*** 330,336 ****
*) nroff_dev="ascii" ;;
esac
! NROFF="$NROFF -T$nroff_dev"
EQN="$EQN -T$nroff_dev"
*** /usr/ports/net/asterisk/work/asterisk-1.8.25.0/contrib/scripts/vmail.cgi Sat Sep 20 09:52:20 2008
--- vmail.cgi Thu Jan 9 13:45:11 2014
***************
*** 20,25 ****
--- 20,26 ----
use DBI;
use Fcntl qw ( O_WRONLY O_CREAT O_EXCL );
use Time::HiRes qw ( usleep );
+ use DateTime::Format::Strptime;