Skip to content

Instantly share code, notes, and snippets.

View kat0h's full-sized avatar
:octocat:

Kota Kato kat0h

:octocat:
  • UEC
View GitHub Profile
@sheepla
sheepla / ojosudo
Last active February 9, 2024 15:35
sudo but for お嬢様
#!/bin/sh
echo -e "貴方は領主様から通常の講習を受けたはずですわ。
これは通常、以下の3点に要約されますの:
#1) 市民の皆様のプライバシーを尊重すること。
#2) タイプする前に考えること。
#3) そしてノブレス・オブリージュを肝に銘じておくことですわ。
"
exec sudo "${@}"

サワードウ・スターター(天然酵母)づくり編

用意するもの

  • ライ麦全粒粉もしくは小麦粉全粒粉
    • ライ麦なら酸味が強め、小麦粉なら弱めになる
  • 口の広いガラス瓶

つくりかた

@greymd
greymd / sudo新一.md
Last active April 25, 2024 06:34
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:& };: でプロセステーブ

@kuuote
kuuote / kana.vim
Created July 12, 2021 14:04
Vimでかな入力するやつ
function! kana#init() abort
let s:state = {}
let s:state.preedit = ""
let s:state.preedit_next = ""
let s:state.kakutei = v:false
let s:state.feed = ""
let s:table = json_decode(join(readfile("table.json"), ""))
call kana#map()
endfunction
@sheepla
sheepla / radio.sh
Last active August 20, 2023 22:25
Listen to radio CLI with interactive menu
#!/bin/bash
# Listen to radio cli
# Dependence:
# - fzf: fuzzy finder
# - ffplay: music player (Install `ffmpeg`)
cat << EOS | ffplay -i -nodisp -v quiet "$(fzf <<< "${channels}" | awk '{print $2}')"
NHKR1 https://nhkradioakr1-i.akamaihd.net/hls/live/511633/1-r1/1-r1-01.m3u8
NHKR2 https://nhkradioakr2-i.akamaihd.net/hls/live/511929/1-r2/1-r2-01.m3u8
@niw
niw / LICENSE
Last active May 14, 2023 15:35
macOS Big Sur Icon Template for Affinity Photo
macOS Big Sur Icon Template for Affinity Photo (c) by Yoshimasa Niwa
macOS Big Sur Icon Template for Affinity Photo is licensed under a
Creative Commons Attribution 4.0 International License.
You should have received a copy of the license along with this
work. If not, see <http://creativecommons.org/licenses/by/4.0/>.
@yegappan
yegappan / VimScriptForPythonDevelopers.MD
Last active January 12, 2024 10:51
Vim script for Python Developers

Vim Script for Python Developers

This is a guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, [key-mapping](https://vimhelp.org/map.txt.html#key-m

@yegappan
yegappan / VimDevelopmentProcess
Last active April 19, 2022 00:15
My development process for contributing to Vim
I use the below described development process and tools for developing Vim features.
I use a Ubuntu system for most of the development. But the tools mentioned below
are also available on MacOS.
1. Clone the Vim source code from https://github.com/vim/vim.git.
2. Modify src/Makefile to enable additional compiler diagnostics:
CFLAGS=-Wall -Wextra -pedantic
@riocampos
riocampos / らじるらじるm3u8をffmpegで録音する(8放送局)201709以降対応.txt
Last active February 5, 2024 11:54
らじるらじる m3u8 を ffmpeg で録音する(8放送局)2021/4 以降対応
## NHKのネット配信サービスであるらじる★らじる。
# 従来は https://gist.github.com/riocampos/5656450 のように rtmpdump を使う必要がありましたが、
# 2017年9月から m3u8 による配信へ変更になったようです。m3u8 なので10秒単位での録音になります。
# また 2021年4月に更新され、以前の M3U8URL は2022年2月末で廃止されました。
## 録音コマンド(m4a)
ffmpeg -i M3U8URL -c copy outputfilename.m4a
# ファイルサイズ的に m4a が最も小さくなる
# m4a ファイルのときだけ "-c copy" オプションが使える。