Skip to content

Instantly share code, notes, and snippets.

@false-git
false-git / test.html
Created April 25, 2014 05:59
以下のhtmlをIEで表示して、ボタンにカーソルを合わせるとレイアウトが変わる
<html>
<body>
<div><h1>this is h1</h1></div>
<div>this is contents.</div>
<form>
<input type="submit" value="button">
</form>
</body>
</html>
--- a/lib/MT/Object.pm
+++ b/lib/MT/Object.pm
@@ -301,10 +301,10 @@ sub install_properties {
return unless $dbd->need_encode;
my $data = $obj->get_values;
- foreach ( keys %$data ) {
- $data->{$_} = Encode::encode( $enc, $data->{$_} )
- if Encode::is_utf8( $data->{$_} );
- }
@false-git
false-git / makejman.sh
Last active August 29, 2015 14:17
FreeBSD のmanを日本語対応する
PDIR=`pwd`
fetch https://gist.githubusercontent.com/false-git/7183d616527e8efda181/raw/7613fcea21e1a00618bc395878586ec6189af964/man.patch
fetch https://gist.githubusercontent.com/false-git/7183d616527e8efda181/raw/53c7ab2196c61be336e910a66a6b9423457193b9/mdoc.local.add
fetch https://gist.githubusercontent.com/false-git/7183d616527e8efda181/raw/fe5aa7e9aa3e1e68a0bf780eb69dac01f41da44e/man.local.add
fetch http://distcache.FreeBSD.org/local-distfiles/hrs/tmac-20030521_2.tar.gz
cp /usr/bin/man /usr/local/bin/
cd /usr/local/bin/
patch < $PDIR/man.patch
cd /usr/local/share/groff/site-tmac
V=`uname -r|sed 's/-.*//'`
@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 / 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
@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")))
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