This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ffi' | |
module FFI | |
typedef :pointer, :Display | |
typedef :ulong, :XID | |
typedef :XID, :Window | |
typedef :int, :Status | |
typedef :ulong, :Atom | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# キーイベントを表示する | |
EV_KEY = 1 | |
EVIOCGRAB = 1074021776 | |
key_code = {} | |
IO.readlines('/usr/include/linux/input-event-codes.h').each do |line| | |
if line.sub(/\/\*.*/, '') =~ /#define\s(KEY_\w+)+\s+(.+)(\/\*.*)?$/ | |
key, code = $1, $2 | |
eval("#{key} = #{code}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 自動的に 0〜9 キーを入力する | |
UI_SET_EVBIT = 1074025828 | |
UI_SET_KEYBIT = 1074025829 | |
UI_DEV_SETUP = 1079792899 | |
UI_DEV_CREATE = 21761 | |
EV_KEY = 1 | |
EV_SYN = 0 | |
SYN_REPORT = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dir1=$(mktemp -d) | |
dir2=$(mktemp -d) | |
trap "rm -rf $dir1 $dir2" EXIT | |
cat $1 | (cd $dir1 && tar xf - && tar xf data.tar.gz && gunzip metadata.gz checksums.yaml.gz) | |
cat $2 | (cd $dir2 && tar xf - && tar xf data.tar.gz && gunzip metadata.gz checksums.yaml.gz) | |
diff --color=auto -ur $dir1 $dir2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var e=document.querySelector('.hls-player_controller'); if(e.style.display=='none'){e.style.display=''}else{e.style.display='none'}})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+------+------+-------+ | |
| code | sjis | cp932 | | |
+------+------+-------+ | |
| 815F | \ | \ | | |
| 8160 | 〜 | ~ | | |
| 8161 | ‖ | ∥ | | |
| 817C | − | - | | |
| 8191 | ¢ | ¢ | | |
| 8192 | £ | £ | | |
| 81CA | ¬ | ¬ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
z1 ○ | |
z! ● | |
z2 ▽ | |
z@ ▼ | |
z3 △ | |
z# ▲ | |
z4 □ | |
z$ ■ | |
z5 ◇ | |
z% ◆ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Postfix はソースが公開されてはいるもののリポジトリが公開されていない | |
# ので、公開されている tarball から git リポジトリを作るためのスクリプ | |
# トを作ってみました。 | |
# | |
# 次の場所から、postfix-*.tar.gz を持ってきて、どっかに置いておきます。 | |
# * ftp://ftp.porcupine.org/mirrors/project-history/postfix/official/ | |
# * ftp://ftp.porcupine.org/mirrors/postfix-release/official/ | |
# tar.gz ファイルの日付の古い順に処理するので、ファイルの日付までコピー |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=/sys/devices/platform/i8042 | |
SPEED=200 | |
SENSITIVITY=200 | |
modprobe -r psmouse | |
modprobe psmouse proto=any | |
while :; do | |
until [ -f $DIR/serio*/serio*/speed -a -f $DIR/serio*/serio*/sensitivity ]; do | |
sleep 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'(riece-default-coding-system (quote (utf-8 . utf-8))) | |
'(riece-default-freeze t) | |
'(riece-keywords (quote ("hoge" "fuga"))) | |
'(riece-log-coding-system (quote utf-8)) | |
'(riece-server "localhost") | |
'(riece-startup-channel-list (quote ("#a" "#hoge" "#tmtms" "#hogehoge"))) | |
;; riece |
NewerOlder