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
| #!/usr/bin/env sh | |
| _IFS="$IFS" | |
| IFS=$'\n' | |
| for i in $(find . -mindepth 1 -maxdepth 1 -type d | sort); do | |
| if [ -d "$i/.git" ]; then | |
| printf "$i: " | |
| cd "$i" |
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
| # sizes | |
| find . -type f -printf "%p %s\n" | sort | |
| # md5 checksums | |
| find . -type f -exec md5sum "{}" \; | awk '{ print $2,$1 }' | sort |
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 | |
| CHECK_URL="https://store.google.com/" | |
| CHECK_STRING="Nexus 5" | |
| MAIL_TO="mail@example.org" | |
| MAIL_SUBJECT="$CHECK_STRING" | |
| MAIL_BODY="$CHECK_URL" | |
| COUNT="$(curl -Ls "$CHECK_URL" | grep -c "$CHECK_STRING")" |
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
| ### invalid logins | |
| # journalctl (last 7 days) | |
| journalctl --since -7d | grep 'sshd.*Invalid' | awk '{ print $10 }' | sort | uniq -c | |
| journalctl --since -7d | grep 'sshd.*Invalid' | awk '{ print $10 }' | sort | uniq | xargs -n1 dig +short -x | |
| # /var/log/auth.log | |
| cat /var/log/auth.log | grep 'sshd.*Invalid' | awk '{ print $10 }' | sort | uniq -c | |
| cat /var/log/auth.log | grep 'sshd.*Invalid' | awk '{ print $10 }' | sort | uniq | xargs -n1 dig +short -x |
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
| #!/usr/bin/env sh | |
| PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)" | |
| PROJECT_NAME="$(cat "$PROJECT_ROOT/src/package.json" | grep '"name"' | cut -d\" -f4)" | |
| PROJECT_VERSION="$(cat "$PROJECT_ROOT/src/package.json" | grep '"version"' | cut -d\" -f4)" | |
| rsync -vrLkpogt --delete-before --progress \ | |
| --exclude .DS_Store \ | |
| --exclude build \ |
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
| #!/usr/bin/env bash | |
| # to be used as symlink, e.g. ./foobar-mount.sh -> ~/bin/_enc-mount.sh | |
| # will mount encrypted dir ./.foobar to mount point ./foobar | |
| SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| SCRIPT_FILE="$(basename "${BASH_SOURCE[0]}")" | |
| SCRIPT_NAME="${SCRIPT_FILE%.*}" | |
| ENC="${SCRIPT_NAME%-*}" |
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
| gdk-pixbuf-query-loaders --update-cache |
OlderNewer