Skip to content

Instantly share code, notes, and snippets.

View td-shi's full-sized avatar

TD氏 td-shi

  • Near Port
View GitHub Profile
@td-shi
td-shi / self-extract-script.sh
Last active January 9, 2022 00:53
This script is the self-extracting archive template. The MD5 of archive data is a69fb4d0185baa34f1a809de747a22f7.
#!/bin/bash --posix
# -*- coding:utf-8 -*-
# === Coding shell scripting Memo ==============================================
# === Initialize shell environment =============================================
#set -u # Just stop undefined values.
#set -e # Just stop error.
#set -x # Debug running command.
umask 0022
@td-shi
td-shi / tokipona.utx
Created January 2, 2022 12:57
Toki pona dictionary with UTX format.
#UTX 1.20
#license: CC BY SA 3.0; glossary id: toki pona basic vocabulary; copyright: TD-shi (2022); creation date 2022-01-02; glossary version: 0.02
## このトキポナ用語集は[WIKIBOOKS トキポナ/辞書](https://ja..wikibooks.org/wiki/%E3%83%88%E3%82%AD%E3%83%9D%E3%83%8A/%E8%BE%9E%E6%9B%B8)を元に作られました.
#src:tpn tgt:ja tgt:en x-exp
a (間投詞)あ!, あー……, あははは! (interjection; emotion word)
akesi 爬虫類, 両生類 reptile, amphibian, big arthropod
anu (接続詞)または or
ala 無, 否定, 零, ~のない, ~ではない, 無~, 非~, (間投詞)いいえ! not, no, zero
alasa 集める, 狩る to gather, to collect food, to hunt
ali 森羅万象, 全ての, 全体の everything, all
@td-shi
td-shi / gitignore
Created November 18, 2021 12:52
This is .gitignore template which white list style. Rename to `.gitignore` and put on the repository root.
# .gitignore
# Ignore All
*
!*/
# White List
!.gitignore
!.gitattributes
!.git/*
!.github/*
@td-shi
td-shi / b64post.sh
Last active August 12, 2021 07:25
b64post.sh generate from base64 to character symbols are a post bar '0' - '7' , stop, start and end(for adjast view).
#!/bin/sh
# -*- coding:utf-8 posix -*-
# === Coding shell scripting Memo ==============================================
# ${<name>#<pattern>} :: matching delete with shortest by forword.
# ${<name>##<pattern>} :: matching delete with longest by forword.
# ${<name>%<pattern>} :: matching delete with shortest by backword.
# ${<name>%%<pattern>} :: mathing delete with longest by backword.
# ${<name>/<before>/<after>} :: replace only first matching.
# ${<name>//<before>/<after>} :: replace all matching.
@td-shi
td-shi / rep2ascii.sh
Created July 31, 2021 13:49
Replacing to a ASCII character.
#!/bin/bash --posix
# -*- coding:utf-8 -*-
# === Coding shell scripting Memo ==============================================
# ${<name>#<pattern>} :: matching delete with shortest by forword.
# ${<name>##<pattern>} :: matching delete with longest by forword.
# ${<name>%<pattern>} :: matching delete with shortest by backword.
# ${<name>%%<pattern>} :: mathing delete with longest by backword.
# ${<name>/<before>/<after>} :: replace only first matching.
# ${<name>//<before>/<after>} :: replace all matching.
@td-shi
td-shi / lid.sh
Last active July 31, 2021 00:43
The lid.sh generate 9-character random and based date string.
#!/bin/sh
# -*- coding:utf-8 posix -*-
# === Coding shell scripting Memo ==============================================
# ${<name>#<pattern>} :: matching delete with shortest by forword.
# ${<name>##<pattern>} :: matching delete with longest by forword.
# ${<name>%<pattern>} :: matching delete with shortest by backword.
# ${<name>%%<pattern>} :: mathing delete with longest by backword.
# ${<name>/<before>/<after>} :: replace only first matching.
# ${<name>//<before>/<after>} :: replace all matching.
@td-shi
td-shi / plantuml-config-head.pu
Created July 27, 2021 12:35
The configuration plantuml on file head
@startuml
skinparam shadowing false
skinparam monochrome true
skinparam defaultFontName Helvetica
skinparam BackgroundColor transparent
skinparam ActivityBackgroundColor #FFFFFF
skinparam ActivityDiamondBackgroundColor #FFFFFF
skinparam ActorBackgroundColor #FFFFFF
skinparam AgentBackgroundColor #FFFFFF
@td-shi
td-shi / base64.sh
Last active March 15, 2021 13:55
Encode and decode to or from base 64.
#!/bin/sh
# -*- coding:utf-8 posix -*-
# === Coding shell scripting Memo ==============================================
# ${<name>#<pattern>} :: matching delete with shortest by forword.
# ${<name>##<pattern>} :: matching delete with longest by forword.
# ${<name>%<pattern>} :: matching delete with shortest by backword.
# ${<name>%%<pattern>} :: mathing delete with longest by backword.
# ${<name>/<before>/<after>} :: replace only first matching.
# ${<name>//<before>/<after>} :: replace all matching.
@td-shi
td-shi / damm.sh
Last active March 15, 2021 13:27
Generate checkdigit by damm algorithm.
#!/bin/sh
# -*- coding:utf-8 posix -*-
# === Coding shell scripting Memo ==============================================
# ${<name>#<pattern>} :: matching delete with shortest by forword.
# ${<name>##<pattern>} :: matching delete with longest by forword.
# ${<name>%<pattern>} :: matching delete with shortest by backword.
# ${<name>%%<pattern>} :: mathing delete with longest by backword.
# ${<name>/<before>/<after>} :: replace only first matching.
# ${<name>//<before>/<after>} :: replace all matching.
@td-shi
td-shi / POSIX_commands.md
Last active December 1, 2023 12:49
About POSIX commands list

POSIX commands

You should refer the original page. The all copyrights of these documents belong to them.

Using frequent

filter

  • grep :: search a file for a pattern