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
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
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
| while IFS='' read -r line || [[ -n "$line" ]]; do | |
| echo "Blocking IP: $line..." | |
| iptables -A INPUT -s $line -j DROP || { echo 'Blocking failed.' ; exit 1; } | |
| done < "$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
| for pid in $(ps -ef | awk '/some search/ {print $2}'); do kill -9 $pid; done |
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 | |
| input="$1" | |
| echo "$input" | |
| while read -r var | |
| do | |
| link=$(echo "${var}" |rev |sed 's/^.*?//' |rev) | |
| echo "$link" | |
| done < "$input" |
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
| xargs -n 1 curl -O < files.txt |
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
| iterate_dir=$(pwd) | |
| for entry in "${iterate_dir}"/*.jpg | |
| do | |
| fn=$(echo "${entry}" |rev| cut -f 1 -d '/'|rev) | |
| echo "${fn}" | |
| parsed_fn="$(echo ${fn} |cut -f 1 -d '.')" | |
| mkdir "${parsed_fn}" | |
| done |
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
| base_dir=$(pwd) | |
| list=`find ${base_dir} -type d` | |
| for directory in $list; do | |
| cd $directory | |
| for file in *.png | |
| do | |
| if [ "$file" = "*.png" ] | |
| then | |
| continue |