This file contains 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
# run parted on both drives, my case they were sdb and sdc | |
# label as gpt, unit TB, etc.. | |
# create mdadm device and get to bed | |
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 | |
# format anyway you like on your new device | |
# make mdadm.conf | |
mdadm -Db /dev/md0 >> /etc/mdadm/mdadm.conf |
This file contains 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
cat some.file | awk '$11 == "504" || $11 == "500"' |
This file contains 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 | |
#https://pushover.net/ - try it! | |
server_hostname="something" | |
ip="`curl -s checkip.dyndns.com | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"`" | |
curl -s \ | |
-F "token=app.token.key" \ | |
-F "user=user.key" \ |
This file contains 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
set realname = "Your Name" | |
set folder = "imaps://imap.gmail.com:993" | |
set spoolfile = "+INBOX" | |
set postponed="+[Gmail]/Drafts" | |
set header_cache=~/.mutt/cache/headers | |
set message_cachedir=~/.mutt/cache/bodies | |
set certificate_file=~/.mutt/certificates | |
set imap_user = "[email protected]" | |
set imap_pass = "pass" | |
set smtp_url = "smtp://[email protected]:[email protected]:587/" |
This file contains 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
# add user to vboxsf group | |
sudo usermod -a -G vboxsf user | |
# append to fstab | |
SHARENAME /mount/dir vboxsf uid=of-user,gid=of-user 0 0 |
This file contains 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
postqueue -p #read queue headers | |
postcat -q #{message_id} #read message | |
postsuper -d ALL deferred #delete deferred |
This file contains 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
git init; git add .; git commit #current directory | |
git fetch path/to/repo master:whatever-branch-name-you-want | |
git merge whatever-branch-name-you-want |
This file contains 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
echo "3/2+1" | bc -l |
This file contains 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
ADD RULE with PORT and IPADDRESS | |
sudo iptables -A INPUT -p tcp -m tcp --dport port_number -s ip_address -j ACCEPT | |
ADD RULE for PORT on all addresses | |
sudo iptables -A INPUT -p tcp -m tcp --dport port_number --sport 1024:65535 -j ACCEPT | |
DROP IPADRESS | |
sudo iptables -I INPUT -s x.x.x.x -j DROP | |
VIEW IPTABLES with rule numbers |
This file contains 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
> show binary logs; | |
> purge binary logs to 'filename'; |
OlderNewer