Skip to content

Instantly share code, notes, and snippets.

View uwabami's full-sized avatar
🍻

Youhei SASAKI uwabami

🍻
View GitHub Profile
@uwabami
uwabami / uim-off.c
Created February 11, 2017 07:36
commandline から uim を問答無用で off にする
#include <stdio.h>
#include <uim/uim.h>
#include <uim/uim-helper.h>
int main(void)
{
int fd;
// initalize
fd = uim_helper_init_client_fd(NULL);
if (fd < 0) {
fprintf(stderr, "error: uim_helper_init_client_fd()\n");
diff --git a/src/rxvtfont.C b/src/rxvtfont.C
index 1914539..4c0189e 100644
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -1223,92 +1223,63 @@ rxvt_font_xft::load (const rxvt_fontprop &prop, bool force_prop)
return false;
int ftheight = 0;
- bool success = true;
-
@uwabami
uwabami / bluefeather.rb.patch
Created May 15, 2017 08:19
Redmine Markdown Extra Formatter で `[[マルチバイト]]` を扱うための bluefeather の dirty hack
--- bluefeather.rb.orig 2017-05-15 16:20:07.025427957 +0900
+++ bluefeather.rb 2017-05-15 16:20:41.598133562 +0900
@@ -1807,7 +1807,7 @@
@log.debug "%p" % @scanner.string[ startpos-1 .. @scanner.pos-1 ]
rs.warnings << "link-id not found - #{linkid}"
- text += @scanner.string[ startpos-1 .. @scanner.pos-1 ]
+ text += '[' + link + ']' + @scanner[0]
end
@uwabami
uwabami / 0012-Unse-locale-as-en_US.UTF-8.patch
Last active May 16, 2017 10:12
tmux v2.3 で en_US.UTF-8 決め打ちを止めるpatch。ロケールの修正か wcwidth-cjk 使うの前提。
From: Youhei SASAKI <uwabami@gfd-dennou.org>
Date: Sat, 4 Feb 2017 03:30:21 +0900
Subject: Unse locale as en_US.UTF-8
Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
tmux.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
--- a/tmux.c
@uwabami
uwabami / xbacklight
Created May 22, 2017 04:11
xbacklight っぽく gsd-backlight-helper を呼び出すシェルスクリプト
#!/bin/sh
PKEXEC=/usr/bin/pkexec
GSD=/usr/lib/gnome-settings-daemon/gsd-backlight-helper
GETOPT=/usr/bin/getopt
OPT=`getopt -a -o sg --long set, --long get -- "$@"`
show_usage(){
echo "Usage $0 [--get] [--set number]" 1>&2
}
if [ $? != 0 ]; then
show_usage
@uwabami
uwabami / zotero-standalone-posthook.sh
Created May 26, 2017 08:10
Debian で zotero 用に pdftotext と pdfinfo を使う準備をするスクリプト
#!/bin/bash
echo "### Setup pdfinfo and pdftext for Debian ###"
echo "- see https://bugs.debian.org/cgi-bin/bugreport.cgi?att=2;bug=781009"
echo -n "poppler-utils version: "
version=$(dpkg-query -W -f='${Version}' poppler-utils || echo "please_install_poppler-utils")
echo "${version}"
ARCH=`dpkg-architecture -qDEB_HOST_GNU_CPU`
binary_suffix="Linux-${ARCH}"

Keybase proof

I hereby claim:

  • I am uwabami on github.
  • I am uwabami (https://keybase.io/uwabami) on keybase.
  • I have a public key whose fingerprint is 66A4 EA70 4FE2 4055 8D6A C2E6 9394 F354 891D 7E07

To claim this, I am signing this object:

@uwabami
uwabami / 0003-Unforce-locale-en_US.UTF-8.patch
Last active January 9, 2018 04:05
tmux v2.6 で en_US.UTF-8 決め打ちを止める.ロケールの修正か wcwidth-cjk を使うことを前提とする
From: Youhei SASAKI <uwabami@gfd-dennou.org>
Date: Tue, 9 Jan 2018 13:03:58 +0900
Subject: Unset locale forcing
Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
tmux.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/tmux.c b/tmux.c
@uwabami
uwabami / 0011-Use-box-drawing-DECSP-or-ASCII-with-option-pane-bord.patch
Last active November 22, 2019 14:42
tmux v2.3 で pane-border 描画文字を全て ASCII に変えた patch。代替として良い文字があったら教えて下さい。
From: Youhei SASAKI <uwabami@gfd-dennou.org>
Date: Sat, 4 Feb 2017 03:29:22 +0900
Subject: Use box drawing DECSP or ASCII with option 'pane-border-ascii'
Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
options-table.c | 5 +++++
tty-acs.c | 68 ++++++++++++++++++++++++++++-----------------------------
2 files changed, 39 insertions(+), 34 deletions(-)
@uwabami
uwabami / 0001-Use-ASCII-char-for-box-drawning-with-option-pane-bor.patch
Last active December 4, 2019 04:37
tmux v2.6 で 罫線描画を全て ASCII とする patch. 代替文字として良いのがあったら教えて下さい
From: Youhei SASAKI <uwabami@gfd-dennou.org>
Date: Fri, 27 Oct 2017 12:32:42 +0900
Subject: Use ASCII char for box drawning with option pane-border-ascii
Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
options-table.c | 6 ++++++
tty-acs.c | 67 +++++++++++++++++++++++++++++----------------------------
2 files changed, 40 insertions(+), 33 deletions(-)