This file contains hidden or 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
#for ~/.bashrc | |
DULL=0 | |
FG_RED=31 | |
FG_GREEN=32 | |
ESC="\033" | |
NORMAL="\[$ESC[m\]" | |
RED="\[$ESC[${DULL};${FG_RED}m\]" | |
GREEN="\[$ESC[${DULL};${FG_GREEN}m\]" | |
PS1="$NORMAL \$(if [[ \$? == 0 ]]; then echo \"$GREEN\342\234\223\"; else echo \"$RED\342\234\227\"=\$?; fi) $NORMAL\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w \$ " |
This file contains hidden or 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
############## | |
# in ~/.bashrc | |
############## | |
#color in terminal | |
export GREP_OPTIONS='--color=auto' | |
export COLORTERM=terminator | |
export TERM=xterm-256color | |
export CLICOLOR=1 | |
#export LSCOLORS=ExFxCxDxCxegedabagacad |
This file contains hidden or 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
#!/bin/bash | |
####################################################### | |
# purpose : git fetch all & reset head i.e. git force pull | |
# author : njd | |
# created : 2017-04-26 | |
# usage : ./git-force-pull.sh [path] | |
####################################################### | |
if ! [[ -z "$1" ]] ; then | |
cd "$1" || exit 1 |
This file contains hidden or 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
curl -O http://standards-oui.ieee.org/oui.txt | |
time cat oui.txt | awk '/(base 16)/ {printf $1 ":"; for(i=4;i<=NF;i++) printf "%s", $i (i==NF?ORS:OFS)}' | |
time cat oui.txt | grep -F "(base 16)" | awk '{$2=$3="" ; print $0}' | awk -F" " '{print $1 ":" $2}' |
This file contains hidden or 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
https://backhub.co/repositories |
This file contains hidden or 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
export LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl |
This file contains hidden or 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
#!/opt/bin/bash # Synology (requires bash from entware-ng or optware[-ng]) | |
# #!/bin/bash # Other *nix | |
############# EDIT BLOCK ############## | |
array_ping_list=("25.1.2.3" "25.2.3.4" "25.3.4.5") #only the IP's expected always-on | |
array_network_list=("my.net" "my-other.net") #all your networks independent of IP's | |
log_file=~/check-hamachi.log | |
#### OS dependent config: | |
## Linux: | |
hamachi_service_stop="sudo /etc/init.d/logmein-hamachi stop" |
This file contains hidden or 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
#! /bin/sh | |
case "$1" in | |
start) | |
if ( pidof zerotier-one ) | |
then echo "ZeroTier-One is already running." | |
else | |
echo "Starting ZeroTier-One" ; | |
/opt/bin/zerotier-one -d ; | |
echo "$(date) Started ZeroTier-One" >> /opt/var/log/zerotier-one.log ; |
This file contains hidden or 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
#!/bin/sh | |
path="/path/to" | |
binary="executable" | |
parameters="--some-params" | |
background=1 | |
logpath="/opt/var/log" | |
case "$1" in | |
start) |
OlderNewer