Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -eu
function spin() {
spinner="/|\\-/|\\-"
while :
do
for i in `seq 0 7`
do
echo -n "${spinner:$i:1}"
echo -en "\010"
@nobiki
nobiki / settings.json
Last active May 30, 2020 11:44
Windows Terminal
// This file was initially generated by Windows Terminal 1.0.1401.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
// Setting.json Documentation, see: https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md
{
"$schema": "https://aka.ms/terminal-profiles-schema",
sudo apt install -y \
sed \
make \
binutils \
build-essential \
gcc \
g++ \
bash \
patch \
gzip \
#!/bin/bash -eu
cd $(dirname `realpath $0`)
ls ./*.mp4 | sed -e s/\.mp4//g | xargs -IMP4 ffmpeg -i MP4.mp4 -strict -2 MP4.webm
#ls ./*.mp4 | sed -e s/\.mp4//g | xargs -IMP4 ffmpeg -i MP4.mp4 -strict -2 -vcodec vp9 -acodec opus MP4.webm
@nobiki
nobiki / Makefile
Last active November 19, 2019 09:02
make substr
#!/bin/bash -eu
SEARCH := localhost 127.0.0.1
is_local := $(words $(filter $(DOCKER_HOST), $(SEARCH)))
# 未指定
ifeq ($(DOCKER_HOST),)
FOO="empty"
# ローカルではない
else ifeq ($(is_local),0)
@nobiki
nobiki / Makefile
Last active November 15, 2019 07:19
#!/bin/bash -eu
.DEFAULT_GOAL := help
.PHONY: help
STR = foo
$(eval TS := $(shell date +%Y%m%d%H%M%S%N))
hoge: ## [hoge] make hoge STR=bar
@echo "STR: ${STR}"
#
# Automatically generated file; DO NOT EDIT.
# Buildroot 2019.02.4 Configuration
#
BR2_HAVE_DOT_CONFIG=y
BR2_HOST_GCC_AT_LEAST_4_5=y
BR2_HOST_GCC_AT_LEAST_4_6=y
BR2_HOST_GCC_AT_LEAST_4_7=y
BR2_HOST_GCC_AT_LEAST_4_8=y
BR2_HOST_GCC_AT_LEAST_4_9=y
crontab -l | tee /var/tmp/.crontab && vim /var/tmp/.crontab && crontab /var/tmp/.crontab && rm -f /var/tmp/.crontab
@nobiki
nobiki / ojichat
Last active June 6, 2019 01:43
greymd/ojichat: おじさんがLINEやメールで送ってきそうな文を生成する : https://github.com/greymd/ojichat をスクリプトにしたやつ
#!/bin/bash
ARGS=$@
docker run --rm -i greymd/ojichat:latest ${ARGS}
@nobiki
nobiki / rim
Last active March 7, 2019 02:56
面倒な認証とかをexpectで自動化するスクリプト(例: rim git clone https://〜)
#!/bin/bash
ARGS=$@
# match command only
if [ "git" == ${1} ]; then
expect -c "
set timeout 60
spawn ${ARGS}