Skip to content

Instantly share code, notes, and snippets.

View toshi75's full-sized avatar
💭
alive

toshi75

💭
alive
  • Japan
  • 10:40 (UTC +09:00)
View GitHub Profile
#!/usr/bin/env bash
cd "/path/to/save"
TEMP="$(mktemp)"
cat <<- '#___LIST' >"$TEMP"
GITID="ryanoasis"
REPO="nerd-fonts"
#V V V top folder like this. V V V V V V
@toshi75
toshi75 / Kill Beep from shell script on linux
Created October 6, 2021 15:30
Kill Beep from shell script on linux #shell
function nobeep (){
sudo rmmod pcspkr
echo "blacklist pcspkr" >"/tmp/nobeep.conf" &&
sudo mv -f "/tmp/nobeep.conf" "/etc/modprobe.d/nobeep.conf"
}
function set_beep (){
if [[ -f "/etc/modprobe.d/nobeep.conf" ]] ;then
sudo rm "/etc/modprobe.d/nobeep.conf"
fi
@toshi75
toshi75 / Count cpu cores from bash script
Created October 6, 2021 14:54
Count cpu cores from bash script #shell
CPU_CORES="$(getconf _NPROCESSORS_ONLN)"
REAL_CPU_CORES="$(grep ^cpu\\scores /proc/cpuinfo |uniq |awk '{print $4}')"
@toshi75
toshi75 / awk縦横変換
Created September 12, 2021 23:05
awk 縦横変換 #awk #shell
ls -1A ./ |awk -v ORS=" " '{print}' # 空白区切り
ls -1A ./ |awk -v ORS="," '{print}' # ,区切り
@toshi75
toshi75 / easy nerdfont patcher
Created August 21, 2021 23:30
easy nerdfont patcher
#!/usr/bin/env bash
DIR="$(pwd)"
TEMP_DIR="/tmp/NERD"
if [[ ! -f "${TEMP_DIR}"/nerd-fonts/font-patcher ]] ;then
echo "Need space over 6G in /tmp."
df -h /tmp |awk '{print $4}'
while true ;do
read -p "Continue? Y/n > " WAIT
case "$WAIT" in
@toshi75
toshi75 / tweak nemo-terminal plugin
Created February 28, 2021 06:26
tweak nemo-terminal plugin
#https://github.com/linuxmint/nemo-extensions/issues/156
Anyway, here you go people...
Edit the nemo_terminal.py file in src directory:
Add Pango for the fonts:
from gi.repository import Pango
Customize cursor type, font, fg, bg color, etc in __init__ function:
def __init__(self, uri, window):
@toshi75
toshi75 / pluma
Last active February 25, 2021 11:23
change plma editor shortcut keys
d-conf editor
/org/gnome/desktop/interface/can-change-accels
=> true
edit
$HOME/.config/pluma/accels
and remove "comment out"=>";".
@toshi75
toshi75 / PKGBUILD source from ssh private repo.
Created October 29, 2020 14:01
PKGBUILD source from private repo.
git+http://gitlab.com/user/pribate.git
git+ssh://git@gitlab.com/user/private.git
@toshi75
toshi75 / PKGBUILD source from ssh private repo.
Created October 29, 2020 14:01
PKGBUILD source from private repo.
git+http://gitlab.com/user/pribate.git
git+ssh://git@gitlab.com/user/private.git
@toshi75
toshi75 / lightdm to gdm
Created October 21, 2020 22:14
lightdm to gdm
sudo pacman -S gdm
sudo systemctl enable gdm.service -f