Skip to content

Instantly share code, notes, and snippets.

View mnogu's full-sized avatar

Muneyuki Noguchi mnogu

View GitHub Profile
@mnogu
mnogu / gist:c5fd15196980a7487154
Last active August 29, 2015 14:06
Red–black tree impl
class Node(object):
def __init__(self, key, val, color, n):
self.key = key
self.val = val
self.color = color
self.n = n
self.left = None
self.right = None
@mnogu
mnogu / install-uim-qt5-immodule.sh
Created July 7, 2013 06:25
quick and dirty shell script to install the uim Qt5 immodule on an AMD64 Ubuntu 13.04 box
git clone https://github.com/uim/uim.git
cd uim
./make-wc.sh --with-qt5 --with-qt5-immodule --libexecdir=/usr/lib/x86_64-linux-gnu/uim/
make
sudo cp qt5/immodule/plugins/platforminputcontexts/libuimplatforminputcontextplugin.so /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/
sudo cp qt5/candwin/uim-candwin-qt5 /usr/lib/x86_64-linux-gnu/uim/
@mnogu
mnogu / llvm-gcc-sigscheme.patch
Created April 14, 2013 08:35
sigscheme's workaround for an llvm-gcc 4.2 optimization bug
--- sigscheme/src/list.c.org 2013-04-14 17:30:50.000000000 +0900
+++ sigscheme/src/list.c 2013-04-14 17:31:00.000000000 +0900
@@ -258,7 +258,7 @@
SCM_EXPORT scm_int_t
scm_finite_length(ScmObj lst)
{
- scm_int_t len;
+ volatile scm_int_t len;
for (len = 0; CONSP(lst); lst = CDR(lst))
@mnogu
mnogu / xinput.d-uim.patch
Created December 31, 2012 05:26
The short description of the configuration file for imsettings is wrong.
--- /etc/X11/xinit/xinput.d/uim.conf.org 2012-12-31 14:19:56.343174599 +0900
+++ /etc/X11/xinit/xinput.d/uim.conf 2012-12-31 14:23:10.438215292 +0900
@@ -1,6 +1,6 @@
XIM=uim
XIM_PROGRAM=/usr/bin/uim-xim
-SHORT_DESC=UIM
+SHORT_DESC=uim
ICON=/usr/share/uim/pixmaps/uim-icon.png
gtkimm_exists () {
retrieve kde4_cmake_uninstall.cmake.in.diff from https://bugs.kde.org/show_bug.cgi?id=272953
$ cat kde4_cmake_uninstall.cmake.in.diff
--- kde4_cmake_uninstall.cmake.in.orig 2011-04-01 22:55:50.000000000 +0900
+++ kde4_cmake_uninstall.cmake.in 2011-05-10 23:15:14.437055087 +0900
@@ -5,18 +5,18 @@
FILE(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
STRING(REGEX REPLACE "\n" ";" files "${files}")
FOREACH(file ${files})
- MESSAGE(STATUS "Uninstalling \"${file}\"")
for i in `git branch -r|grep -v HEAD|grep -v master|sed 's:origin/::g'`
do
git checkout --track -b $i origin/$i
done
git checkout master
@mnogu
mnogu / gauche-0.9.3.3.patch
Created June 3, 2012 05:32
patch for gauche-0.9.3.3.ebuild
--- gauche-0.9.3.3.ebuild.org 2012-06-03 14:28:30.000000000 +0900
+++ gauche-0.9.3.3.ebuild 2012-06-03 14:28:39.000000000 +0900
@@ -47,6 +47,6 @@
}
src_install() {
- emake DESTDIR="${D}" install-pkg install-doc
+ emake -j1 DESTDIR="${D}" install-pkg install-doc
dodoc AUTHORS ChangeLog HACKING README
}
@mnogu
mnogu / build.log
Created June 3, 2012 04:59
/var/tmp/portage/dev-scheme/gauche-0.9.3.3/temp/build.log
 * Package: dev-scheme/gauche-0.9.3.3
 * Repository: gentoo
 * Maintainer: hattya@gentoo.org scheme@gentoo.org
 * USE: amd64 consolekit elibc_glibc ipv6 kernel_linux multilib policykit userland_GNU
 * FEATURES: ccache sandbox
>>> Unpacking source...
>>> Unpacking Gauche-0.9.3.3.tgz to /var/tmp/portage/dev-scheme/gauche-0.9.3.3/work
>>> Source unpacked in /var/tmp/portage/dev-scheme/gauche-0.9.3.3/work
>>> Preparing source in /var/tmp/portage/dev-scheme/gauche-0.9.3.3/work/Gauche-0.9.3.3 ...
* Applying gauche-rpath.diff ...
uim:
'^(libgcroots-trunk|sigscheme-trunk|uim-chewing-trunk|vendor|wiki|tags/(gc*|libgcroots-*|openssh-*|sigscheme-*|slib*)|branches/(libgcroots-*|sigscheme-*))'
sigscheme:
'^(libgcroots-trunk|uim-chewing-trunk|vendor|wiki|tags/(gc*|libgcroots-*|openssh-*|slib*)|branches/libgcroots-*)'
libgcroots:
'^(trunk|sigscheme-trunk|uim-chewing-trunk|vendor|wiki|tags/(openssh-*|sigscheme-*|uim-*|1*|slib*)|branches/(0*|1*|composer|r5rs|sigscheme-*|uim-*))'
uim-chewing: