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
ipset -N tor iphash | |
curl 'https://check.torproject.org/torbulkexitlist?ip=' | xargs -n 1 ipset -A tor | |
iptables -A INPUT -m set --match-set tor src -j DROP |
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
kubectl get replicaset -o json|jq '.items[]|select(.status.replicas == 1)|.metadata.name' -r |
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
If a running program still has the deleted file open, you can recover the file through the open file descriptor in /proc/[pid]/fd/[num]. To determine if this is the case, you can attempt the following: | |
$ lsof | grep "/path/to/file" | |
If the above gives output of the form: | |
progname 5383 user 22r REG 8,1 16791251 265368 /path/to/file | |
take note of the PID in the second column, and the file descriptor number in the fourth column. Using this information you can recover the file by issuing the command: | |
$ cp /proc/5383/fd/22 /path/to/restored/file | |
If you're not able to find the file with lsof, you should immediately remount the file system which housed the file read-only: |
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
# Put this in your ~/.gitconfig or ~/.config/git/config | |
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName> | |
[user] | |
name = Your Full Name | |
email = [email protected] | |
[color] | |
# Enable colors in color-supporting terminals | |
ui = auto | |
[alias] | |
st = status |