Skip to content

Instantly share code, notes, and snippets.

@msmhrt
msmhrt / katakana_variants.txt
Last active October 14, 2015 01:08
Katakana word list for the master branch of vim-jp/vimdoc-ja (2013/09/04)
アイディア(10)、アイデア(8)
インクリメンタル・サーチ(1)、インクリメンタルサーチ(1)
インターフェース(58)、インターフェイス(50)、インタフェイス(10)
インタープリタ(17)、インタプリタ(2)
ウィンドウマネージャ(10)、ウィンドウ・マネージャー(1)
エスケープシーケンス(15)、エスケープ・シーケンス(1)
エディタサーバー(1)、エディタサーバ(1)
エラーメッセージ(207)、エラー・メッセージ(1)
オペレータ(115)、オペレーター(6)
キャラクタ(24)、キャラクター(1)
@msmhrt
msmhrt / failed.txt
Created November 15, 2012 23:02
iv build log
1>------ Build started: Project: lv5, Configuration: Debug Win32 ------
1> v8-dtoa.cc
1> utils.cc
1> platform.cc
1> fast-dtoa.cc
1> diy-fp.cc
1> conversions.cc
1> checks.cc
1> main.cc
1>c:\users\msmhrt\repository\iv\iv\conversions.h(176): warning C4305: '初期化中' : 'unsigned __int64' から 'const size_t' へ切り詰めます。
@msmhrt
msmhrt / twitter-text.py
Created November 10, 2012 01:17
sample code using the regex module
import regex
UNICODE_SPACES = ("[" +
"\\u0009-\\u000d" + # White_Space # Cc [5] <control-0009>..<control-000D>
"\\u0020" + # White_Space # Zs SPACE
"\\u0085" + # White_Space # Cc <control-0085>
"\\u00a0" + # White_Space # Zs NO-BREAK SPACE
"\\u1680" + # White_Space # Zs OGHAM SPACE MARK
"\\u180E" + # White_Space # Zs MONGOLIAN VOWEL SEPARATOR
"\\u2000-\\u200a" + # White_Space # Zs [11] EN QUAD..HAIR SPACE
@msmhrt
msmhrt / gist:3973257
Created October 29, 2012 12:26
Test of fixed array
$ lv5 --version
lv5 0.0.2 (compiled Oct 29 2012 21:10:28)
$ lv5
> var fixed = new Array(10);
undefined
> Object.defineProperty(fixed, "length", { writable: false });
,,,,,,,,,
> fixed[10] = 20
20
> fixed[10]
@msmhrt
msmhrt / libguestfs-test-tool.log
Created August 27, 2012 11:38
Mac OS X 10.8.1, libguestfs-test-tool 1.19.33 and qemu 1.2.0-rc1
===== Test starts here =====
LIBGUESTFS_PATH=/Users/qemu/local/lib/guestfs/appliance
TMPDIR=/var/folders/q_/4ljt7d2x0lsg1fyb7d6d5t6c0000gq/T/
library version: 1.19.33
guestfs_get_append: (null)
guestfs_get_attach_method: appliance
guestfs_get_autosync: 1
guestfs_get_direct: 0
guestfs_get_memsize: 500
guestfs_get_network: 0
diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 9abbada..6716231 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -76,7 +76,7 @@ DeviceState *pci_vga_init(PCIBus *bus)
}
static Property vga_pci_properties[] = {
- DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 16),
+ DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 8),
# for python 2/3
sudo apt-get -y install autoconf debhelper gdb help2man libbz2-dev libdb5.1-dev libexpat1-dev libffi-dev libgdbm-dev libgpm2 libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev locales lsb-release mime-support netbase python quilt sharutils zlib1g-dev
@msmhrt
msmhrt / file0.txt
Created July 9, 2012 11:42
Pythonでtest.pyを作るな! ref: http://qiita.com/items/7e2a335a4c64bcc6e044
$ echo from test import support >test.py
$ python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
from test import support
File "/tmp/tmp.TWTFmPjXqY/test.py", line 1, in <module>
from test import support
ImportError: cannot import name support
$ mv test.py test_.py
$ python test_.py
@msmhrt
msmhrt / teritori4gas.js
Created July 3, 2012 09:21
teritor4gas
/*!
teritori4gas - A Google Apps Script Gadget for generating static HTML codes for tweets
Copyright (c) 2012 Masami HIRATA
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@msmhrt
msmhrt / fix-dso-linking.patch
Created May 20, 2012 12:17
This is a patch for pcre to fix explicit DSO linking issue.
diff --git a/Makefile.am b/Makefile.am
index ce88cc2..d6b7e58 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -339,7 +339,7 @@ pcretest_SOURCES = pcretest.c
pcretest_LDADD = $(LIBREADLINE)
if WITH_PCRE8
pcretest_SOURCES += pcre_printint.c
-pcretest_LDADD += libpcreposix.la
+pcretest_LDADD += libpcre.la libpcreposix.la