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
syntax on | |
set nomodeline | |
set cursorline | |
set list listchars=tab:»·,trail:¤,nbsp:␣ | |
" Show always at least 4 lines below/above | |
set scrolloff=4 | |
"set cursorcolumn | |
hi CursorLine cterm=underline ctermbg=NONE | |
" use spaces instead of tabs | |
autocmd FileType python set ts=4 sw=4 expandtab |
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 | |
test -z "$1" && exit 1 | |
ping -OW 1 "$1" 2>&1 | while read line; do echo `date` - $line; done |tee -a "$1".log |
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 | |
OPTS="" | |
OPTS="$OPTS -o HostKeyAlgorithms=+ssh-rsa,ssh-dss " | |
OPTS="$OPTS -o Ciphers=+aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc " | |
OPTS="$OPTS -o Macs=+hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96 " | |
OPTS="$OPTS -o KexAlgorithms=+diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 " | |
OPTS="$OPTS -o PubkeyAcceptedKeyTypes=+ssh-rsa,ssh-dss " | |
# OPTS="$OPTS -o IdentityFile=none -o IdentityAgent=none " # Enable if you don't want to pass ssh keys or agent | |
unset SSH_AUTH_SOCK |
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 | |
# Setup Debian PXEinstall environment | |
export MYIP=10.66.6.1 # TODO: Setup this | |
export MYINTERFACE=$(netstat -ie | grep -B1 "$MYIP" | head -n1 | awk '{print $1}') | |
if [ -z "$MYINTERFACE" ] | |
then | |
echo "Setup ip $MYIP first" |
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 | |
# Path to directory where backups should be stored. | |
DIR="path/to/mysql_backup" | |
mysqldump -A |gzip -c - > ${DIR}/`date +%Y-%m-%d`.sql.gz | |
if [ "`date +%d`" == "01" ] | |
then | |
cp ${DIR}/`date +%Y-%m-%d`.sql.gz ${DIR}/month_`date +%Y-%m`.sql.gz | |
touch ${DIR}/month_*.sql.gz |
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
### Keybase proof | |
I hereby claim: | |
* I am annttu on github. | |
* I am annttu (https://keybase.io/annttu) on keybase. | |
* I have a public key whose fingerprint is 2123 BD0A F25D 8B6D 923D 9C95 36BA CE45 C579 CB50 | |
To claim this, I am signing this object: |