Skip to content

Instantly share code, notes, and snippets.

View toshi75's full-sized avatar
💭
alive

toshi75

💭
alive
  • Japan
  • 23:48 (UTC +09:00)
View GitHub Profile
@toshi75
toshi75 / #bash: 配列の使いみち
Last active April 2, 2022 21:11
bash array sample
#bash: 配列の使いみち
LIST=(
yt-dlp-git
gallery-dl-git # コメント記述可能
neovim-git # コメント記述可能
jdupes-git
ripgrep-git
wget-git
)
@toshi75
toshi75 / toggle word wrap on terminal
Created March 28, 2022 06:24
toggle word wrap on terminal
printf '\033[?7l' # DISable word wrap.
printf '\033[?7h' # ENable word wrap.
@toshi75
toshi75 / speed up updatedb
Created January 30, 2022 19:15
Speed up updatedb
nice -n 19 ionice -c 3 updatedb
@toshi75
toshi75 / "make => make install" on PKGBUILD
Created January 19, 2022 01:35
"make => make install" on PKGBUILD
# "make => make install" on PKGBUILD
build() {
cd "$pkgname"
# ./autogen.sh
# ./configure --prefix=/usr \
make
}
package() {
@toshi75
toshi75 / PKGBUILD
Created January 8, 2022 23:06
PKGBUILD for Archlinux group install written by EndeavourOS-Team
# EndeavourOS-Team, Great work.
# Maintainer: EndeavourOS-Team <info@endeavouros.com>
pkgname=eos-base
pkgdesc="Required packages in EndeavourOS."
pkgver=1.1
pkgrel=1
arch=('any')
license=('GPL')
depends=(
@toshi75
toshi75 / Border line on terminal
Created January 1, 2022 04:53
Border line on terminal #shell
function BORDER (){
printf '%*s\n' "${2:-$(tput cols)}" '' | tr ' ' "${1:--}"
# 使い方
# 引数でラインのキャラクタを変えられる(デフォルトは-)
# This_function "=" ---> ===========
# 第2引数でラインの長さを変えられる(デフォルトはターミナルの幅いっぱい)
# This_function "=" 10
}
@toshi75
toshi75 / minetypes
Created December 12, 2021 05:39
mine types
# files
txt => text/plain
htm => text/html
html => text/html
php => text/html
css => text/css
js => application/javascript
json => application/json
xml => application/xml
swf => application/x-shockwave-flash
@toshi75
toshi75 / bash for-loop => fish
Created November 16, 2021 05:45
bash for-loop => fish
function bash_for (){
for i in pic{1..5}.png ;do
echo $i
done
for i in pic{4..10}.jpg ;do
echo $i
done
}
@toshi75
toshi75 / bash until-shift-loop => fish
Last active November 16, 2021 05:44
bash idiom "until-shift-loop" => fish shell
function bash_until (){
until [[ "$1" = "" ]] ;do
echo "$1"
shift
done
}
function fish_until
for i in (seq (count $argv))
echo $argv[$i]
{"protocol-version":"1.0","general-settings":{"app-language":"en-US","allow-acceptable-ads":false,"show-blocked-ads-count":true,"autodetect-filters":true,"safebrowsing-enabled":true,"filters-update-period":-1},"extension-specific-settings":{"use-optimized-filters":true,"collect-hits-count":false,"show-context-menu":true,"show-info-about-adguard":false,"show-app-updated-info":false},"filters":{"enabled-groups":[1,2,3,4,5,6,7,0],"enabled-filters":[208,14,17,224,2,3,4,7,118,122,123,201,210,251,11,101,207,215,242,15,204,225,229,5,239,240,241,250],"custom-filters":[{"customUrl":"https://raw.githubusercontent.com/tofukko/filter/master/Adblock_Plus_list.txt","enabled":true,"title":"豆腐フィルタ","trusted":true}],"user-filter":{"rules":"","disabled-rules":""},"whitelist":{"inverted":false,"domains":[],"inverted-domains":[]}}}