This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## | |
# NAME | |
# script-template - this is a template for script functions | |
# | |
# SYNOPSIS | |
# cmd <subcommand> <args> | |
# | |
# DESCRIPTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
LINUX_URL="https://github.com/neovim/neovim/releases/download/stable/nvim.appimage" | |
command -v curl 1>/dev/null || { echo "curl not found"; exit; } | |
curl -sfLo appimage $LINUX_URL || { echo "neovim not found"; exit; } | |
chmod u+x appimage | |
./appimage --appimage-extract 1>/dev/null | |
cp squashfs-root/usr/bin/nvim nvim | |
rm -rf appimage squashfs-root | |
chmod u+x nvim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# VERSION=0.2.3 | |
# shellcheck disable=SC1090 | |
# VARIABLES ---------------------------------- | |
INSTALLATION_DIR="$HOME/.venv" | |
# -------------------------------------------- | |
function main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
COLOR1='RASPBERRY1' | |
COLOR2='RASPBERRY2' | |
SCREEN_THRESHOLD=110 | |
declare -A CODES4=(\ | |
#4-BIT | |
['RED']=31 ['GREEN']=32 ['YELLOW']=33 ['BLUE']=34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#include here the MAC-ADDRESS of your termux | |
TERMUX_MAC="<your-termux-mac-address>" | |
SEARCH_MAX=64 | |
type nmap &>/dev/null ||\ | |
{ echo "this script need nmap, please install it first"; exit 1; } | |
sudo nmap -sn "$(hostname -I | cut -d' ' -f1)"-"$SEARCH_MAX" 1> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
""" | |
pdir is a pretty print function for the dir() command | |
""" | |
from cmd import Cmd | |
from re import match | |
import os | |
__version__ = "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#check output of ./a.out and checker_file | |
./a.out | diff - checker_file | |
#create main files | |
echo {0..10}-main.c | |
#touch File1, File2, File3 and remove the , | |
echo "File1, File2, File3" | tr -d , | xargs touch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* run this command in terminal | |
* $ gcc -g 16-track_origins.c && valgrind -q ./a.out 2> a && valgrind -q --track-origins=yes ./a.out 2> b && vimdiff a b | |
* run this command in a buffer and b buffer of vimdiff and don't forget to change <pidNum> by the pid of the buffer | |
* :%s/<pidNum>/xxxx/g | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
CONTAINER="${1-main}" | |
ENTRYPOINT="${2-bash}" | |
docker start "${CONTAINER}" | |
docker exec -ti "${CONTAINER}" "${ENTRYPOINT}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git add "$1" | |
git commit -m "$2" | |
git push origin "$(git branch | grep \* | cut -d' ' -f2)" |
NewerOlder