Skip to content

Instantly share code, notes, and snippets.

@nosada
nosada / base.lst.patch
Last active January 3, 2016 16:09
for /usr/share/X11/xkb/rules/base.lst and /usr/share/X11/xkb/rules/evdev.lst
--- /usr/share/X11/xkb/rules/base.lst 2014-01-18 02:26:21.569898995 +0900
+++ /usr/share/X11/xkb/rules/base.lst.changed 2014-01-18 14:00:36.631972594 +0900
@@ -300,6 +300,7 @@
hbs us: Serbo-Croatian (US)
workman us: English (Workman)
workman-intl us: English (Workman, international with dead keys)
+ cdv us: English (customized Dvorak)
ps af: Pashto
uz af: Uzbek (Afghanistan)
olpc-ps af: Pashto (Afghanistan, OLPC)
@nosada
nosada / PigLatin.py
Last active January 1, 2016 09:09
Pig Latin Translator (Only Plain -> PigLatin)
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Translate plain-text English(or ACII string) into Pig Latin
"""
class PigLatin:
def make_bricks(small, big, goal):
if goal - 5*big > small: # small + 5*big < goal (impossible)
return False
else: # small + 5*big >= goal (partial possible)
if goal%5 > small:
return False
else:
return True
@nosada
nosada / mozc-ut.patch
Last active December 25, 2015 10:39
for explanation on my blog
--- PKGBUILD 2013-10-01 20:08:12.000000000 +0900
+++ PKGBUILD.changed 2013-10-13 20:50:55.703547957 +0900
@@ -5,9 +5,9 @@
##
## You can choose the input method framework to use either ibus and/or uim.
## If you will not be using ibus, comment out below.
-_ibus_mozc="yes"
+#_ibus_mozc="yes"
## If you will be using uim, uncomment below.
-#_uim_mozc="yes"
@nosada
nosada / qtemu.patch
Last active December 23, 2015 17:49
patch for qtemu's PKGBUILD (patching src/machinetab.cpp and generating .desktop by gendesk)
--- PKGBUILD 2013-09-23 07:06:52.000000000 +0900
+++ PKGBUILD.changed 2013-09-22 15:53:36.000000000 +0900
@@ -12,12 +12,17 @@
makedepends=('cmake')
depends=('qemu' 'qt4')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
- http://qtemu.svn.sourceforge.net/viewvc/qtemu/trunk/qtemu/misc/qtemu.desktop)
+ machinetab.patch)
md5sums=('3b93e209dc62e52a1d94c8eb24d0b149'
- 'b323b75384fdb327728d2603979f7202')
@nosada
nosada / machinetab.patch
Created September 22, 2013 07:28
patch for qtemu-1.0.5/machinetab.cpp
--- machinetab.cpp.old 2007-11-13 04:31:00.000000000 +0900
+++ machinetab.cpp 2013-09-22 15:33:23.563347043 +0900
@@ -137,13 +137,13 @@
memoryFrameLayout->addWidget(memoryDescriptionLabel);
memorySlider = new QSlider(Qt::Horizontal, this);
- memorySlider->setRange(4, 1024);
+ memorySlider->setRange(4, 4096);
memorySlider->setSingleStep(4);
memorySlider->setTickPosition(QSlider::TicksBelow);
@nosada
nosada / crfpp.patch
Created September 22, 2013 07:21
patch for crfpp
--- PKGBUILD.old 2013-07-13 21:34:18.054183257 +0900
+++ PKGBUILD 2013-07-13 21:29:29.661837910 +0900
@@ -6,19 +6,19 @@
pkgrel=1
pkgdesc="A Conditional Random Field implementation"
url="http://crfpp.sourceforge.net"
-arch=(x86_64 i686)
-license=(LGPL BSD)
-source=(http://crfpp.googlecode.com/files/CRF%2B%2B-${pkgver}.tar.gz)
+arch=('x86_64' 'i686')
@nosada
nosada / config
Last active August 29, 2015 14:10
zcat /proc/config.gz
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.17.4-1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@nosada
nosada / mecab.setup.patch
Created October 27, 2014 15:07
patch for mecab-python-0.996/setup.py
--- setup.py.orig 2014-10-27 23:13:54.149118580 +0900
+++ setup.py 2014-10-27 23:32:14.945120395 +0900
@@ -7,7 +7,7 @@
return os.popen(str).readlines()[0][:-1]
def cmd2(str):
- return string.split (cmd1(str))
+ return cmd1(str).split()
setup(name = "mecab-python",
@nosada
nosada / fcitx-mozc-ut.PKGBUILD
Last active August 29, 2015 14:05
Modified PKGBUILD and patch for original (https://aur.archlinux.org/packages/fcitx-mozc-ut/) for using latest mozc-ut
# Maintainer: Naoya Inada <naoina@kuune.org>
# fcitx-mozc-ut is based on fcitx-mozc and mozc-ut.
##
## Build configuration
##
## ニコニコ大百科IME辞書 (NICONICOPEDIA IME dictionary, see below)
#_NICODIC="true"
#
## If you want to use an English-Japanese dictionary,