Skip to content

Instantly share code, notes, and snippets.

View toshi-ara's full-sized avatar

Toshiaki Ara toshi-ara

  • Japan
  • 14:27 (UTC +09:00)
View GitHub Profile
@toshi-ara
toshi-ara / .lintr
Created January 8, 2024 22:55
my .lintr setting
linters: linters_with_defaults(
commented_code_linter = NULL,
indentation_linter = NULL,
line_length_linter(120),
object_name_linter = NULL,
trailing_blank_lines_linter = NULL,
trailing_whitespace_linter = NULL,
semicolon_linter(allow_compound = TRUE)
)
@toshi-ara
toshi-ara / doors.R
Last active December 28, 2020 03:53
某問題を解くためのプログラム(R版)
## 某問題をしらみ潰し方式で解くためのプログラム
n <- 200
doors <- integer(n) # 配列の準備(0でリセットされる)
for (i in 1:100) {
idx <- seq(i, n, i) # 200を超えないiの倍数を指定
doors[idx] = doors[idx] + 1 # そのドアの開閉の回数を+1(奇数なら開、偶数なら閉)
}
Open <- (doors %% 2 == 1) # 奇数であれば(ドアが開いている)TRUE、偶数ならFALSE
@toshi-ara
toshi-ara / keymap.txt
Created December 14, 2020 00:00
mozcの個人用キーマップ
status key command
Precomposition Hankaku/Zenkaku IMEOff
Composition Hankaku/Zenkaku IMEOff
Conversion Hankaku/Zenkaku IMEOff
DirectInput Hankaku/Zenkaku IMEOn
Composition Right MoveCursorRight
Composition End MoveCursorToEnd
Composition Down MoveCursorToEnd
Composition Ctrl Right MoveCursorToEnd
Composition Left MoveCursorLeft
@toshi-ara
toshi-ara / fcitx-skk-0.1.4-newChooseKeyType.patch
Last active March 18, 2020 04:14
fcitx-skk-modify: using "asdfjkl"
diff -u -r fcitx-skk-0.1.4-orig/po/fcitx-skk.pot fcitx-skk-0.1.4/po/fcitx-skk.pot
--- fcitx-skk-0.1.4-orig/po/fcitx-skk.pot 2020-03-18 09:44:41.258721725 +0900
+++ fcitx-skk-0.1.4/po/fcitx-skk.pot 2020-03-18 09:49:11.974711877 +0900
@@ -166,3 +166,8 @@
#: src/fcitx-skk.desc:61
msgid "Qwerty Center Row (a,s,d,...)"
msgstr ""
+
+#: src/fcitx-skk.desc:62 (patched)
+msgid "Qwerty Center Row2 (asdfjkl)"
@toshi-ara
toshi-ara / yatex-setting.el
Created January 12, 2020 08:17
texliveのdockerコンテナを使用するときのemacs設定ファイル
(eval-when-compile (require 'yatex))
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
(setq auto-mode-alist
(append '(("\\.tex$" . yatex-mode)
("\\.ltx$" . yatex-mode)
("\\.cls$" . yatex-mode)
("\\.sty$" . yatex-mode)
("\\.clo$" . yatex-mode)
("\\.bbl$" . yatex-mode)) auto-mode-alist))
@toshi-ara
toshi-ara / Vine65_to_VineSeed.sh
Last active January 4, 2020 06:33
upgrade Vine 6.5 to VineSeed (2019.12.28)
## install Vine 6.5 (desktop)
## => keyboard layout to jp106
## setting wireless LAN
# apt-get update
# apt-get install FD -y
## restart with runlevel 3
LANG=C
perl -pi -e "s/6.5/VineSeed/g" /etc/apt/sources.list.d/*.list
@toshi-ara
toshi-ara / dictionary_list
Created December 28, 2019 09:20
VineSeedにおけるfcitx-skkの設定 ($HOME/.config/fcitx/skk)
file=$FCITX_CONFIG_DIR/skk/user.dict,mode=readwrite,type=file
file=/usr/share/skk/SKK-JISYO.L,mode=readonly,type=file
file=/usr/share/skk/SKK-JISYO.JIS2,mode=readonly,type=file
file=/usr/share/skk/SKK-JISYO.JIS3_4,mode=readonly,type=file
file=/usr/share/skk/SKK-JISYO.zipcode,mode=readonly,type=file
file=/usr/share/skk/SKK-JISYO.itaiji,mode=readonly,type=file
file=/usr/share/skk/SKK-JISYO.itaiji.JIS3_4,mode=readonly,type=file