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/sh | |
OPTIONS=`vagrant ssh-config | tail -n +2 | awk -v ORS=' ' '{print "-o " $1 "=" $2}'` | |
scp ${OPTIONS} /File/To/Copy vagrant@YourServer:/Where/To/Put/File |
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 | |
# releases should be name after formatted timestamp | |
# date "+%Y%m%d%H%M%S" in order to work | |
time_margin=$(date -d "4 days ago" "+%Y%m%d%H%M%S") | |
for i in $( ls releases ); do | |
if [ "$time_margin" -gt "$i" ]; then | |
echo "$i will be removed" | |
rm -rf releases/$i |
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
#!/usr/bin/env bash | |
## IPTABLES SETUP | |
iptables -F; | |
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP; | |
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP; | |
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP; |
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
function setFileType(file, type) { | |
Object.defineProperties(file, { | |
'type': { | |
writable: true | |
} | |
}); | |
file.type = type; | |
return file; | |
} |