What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-24 22:35:04
iptables_configuration
#!/bin/bash # A sample firewall shell script IPT="/sbin/iptables" SPAMLIST="blockedip" SPAMDROPMSG="BLOCKED IP DROP" SYSCTL="/sbin/sysctl" BLOCKEDIPS="/root/scripts/blocked.ips.txt" # Stop certain ... Add solution -
Other 2021-09-19 17:15:05
gitlab stale branches api script
for branch in `git branch -r | grep -v HEAD`; do \ echo -e `git show --format="%cr %an" $branch | head -n 1` \\t$branch; \ done | \ grep -e '.. months' -e '[8-9] months' | grep 'origin/' | \ sed 's/.*origin\///' | \ xargs -n 1 echo g... Add solution -
Shell/Bash 2021-09-15 21:00:02
ubuntu kill process by name
###################################################### # How to Kill the supervisord process without the PID ###################################################### ps -ef | grep 'supervisord' | grep -v grep | awk '{print $2}' | xargs -r kill -9 Add solution -
Shell/Bash 2021-09-15 17:35:02
get all branches git
# track all remote branches: git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done # update all local copies of remote branches git fetch --all # update all local tracking branc... Add solution -
Shell/Bash 2021-09-15 07:25:02
cat file content after pattern
# greps for Pattern and outputs up to 100000 lines following that line pattern match. grep -A100000 Pattern file # greps for word Partition in multiple file ending in .md and outputs up to 15 lines following that line pattern match. grep -A15 Partition *... Add solution
Best helpers
Ranking is empty