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
echo "foo" | sed 'p;p' | |
echo "foo" | awk '1;1;1' | |
echo "foo" | perl -ne 'print;print;print' | |
echo "foo" | perl -ne 'print "$_"x3' | |
# 参考: https://unix.stackexchange.com/questions/81904/repeat-each-line-multiple-times |
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
const fst = p => p(x => y => x) | |
const snd = p => p(x => y => y) | |
const mult = m => n => s => z => n(m(s))(z) | |
const one = s => z => s(z) | |
const two = s => z => s(s(z)) | |
const one_two = x => x(one)(two) | |
const mult_one_two = x => x(mult)(one_two) | |
// (fst(mult_one_two))(fst(snd(mult_one_two)))(snd(snd(mult_one_two))) | |
((p => p(x => y => x))(x => x(m => n => s => z => n(m(s))(z))(x(s => z => s(z))(s => z => s(s(z))))))((p => p(x => y => x))((p => p(x => y => y))(x => x(m => n => s => z => n(m(s))(z))(x => x(s => z => s(z))(s => z => s(s(z)))))))((p => p(x => y => y))((p => p(x => y => y))(x => x(m => n => s => z => n(m(s))(z))(x => x(s => z => s(z))(s => z => s(s(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
const a = 1 | |
const b = 2 | |
const c = 3 | |
const d = 4 | |
const p1 = x => x(y => y(a)(b))(z => z(c)(d)) | |
const fst = p => p(x => y => x) | |
const snd = p => p(x => y => y) | |
fst(snd(p1)) | |
// (p => p(x => y => x))(snd(p1)) |
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
const two = (s) => (z) => (s) ((s) (z)) | |
const three = (s) => (z) => (s) ((s) ((s) (z))) | |
const mult = (m) => (n) => (s) => (z) => (n) ((m) (s)) (z) | |
const toInt = (n) => (n) (x => x + 1) (0) | |
// six = (mult) (two) (three) | |
// six = ((m) => (n) => (s) => (z) => (n) ((m) (s)) (z)) ((s) => (z) => (s) ((s) (z))) ((s) => (z) => (s) ((s) ((s) (z)))) | |
// six = ((m) => (n) => (s) => (z) => (n) ((m) (s)) (z)) ((x) => (y) => (x) ((x) (y))) ((a) => (b) => (a) ((a) ((a) (b)))) |
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
# 実行前に USB をアンマウントする | |
cd ; curl -Os https://chrx.org/go && sh go -t /dev/sdb -L ja_JP.UTF-8 -Z Asia/Tokyo -U taiju -H chromebook |
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
/* | |
OSO.gs - お掃除おじさん.gs | |
毎週のお掃除のタイミングを idobata に通知するおじさんです。 | |
トリガーに設定した曜日の当月の最初の営業日は、追加メッセージ(appendix)を付与します。 | |
* 使い方: | |
1. 本スクリプトで GAS (Google Apps Script) を作成し、保存します。 | |
2. 下記のスクリプトプロパティを設定します。 | |
idobata_hook_url {idobata の hook URL を指定します (必須)} |
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
FROM buildpack-deps:scm | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
less \ | |
vim \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN git config --global user.name "HIGASHI Taiju" \ | |
&& git config --global user.email "higashi@taiju.info" | |
COPY id_rsa /root/.ssh/id_rsa | |
RUN chmod 400 /root/.ssh/id_rsa | |
ENV LESSCHARSET UTF-8 |
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
;; General settings | |
(setq mew-name "HIGASHI Taiju") | |
(setq mew-user "higashi") | |
(setq mew-mail-domain "taiju.info") | |
;; Password settings | |
(setq mew-use-cached-passwd t) | |
(setq mew-use-master-passwd t) | |
;; SSL settings |
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
seq 2017 2020 | xargs -n1 -IX bash -c 'seq 1 12 | xargs -n1 -IY bash -c '"'"'seq 1 31 | xargs -n1 -IZ printf "%04d%02d%02d\n" X Y Z'"'"'' | xargs -n1 date -R 2>/dev/null -d | awk '$1 == "Fri," && $2 == "13"' | xargs -I{} date -d {} +'%Y/%m/%d' | |
# 参考: https://github.com/hisaharu/shellgei/blob/master/slides/techconf1/lib/md/index.md | |
# 上記の日曜日列挙相当をブレース展開を使わずにやってみる実験。xargs + bash -c をネストすると実現できる。モナドっぽい。エスケープがしんどい。 |
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
echo 'with recursive fibo(i, j) as (select 0, 1 union all select j, i + j from fibo) select i from fibo limit 50;' | sqlite3 |