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
httpry -i eth0 -s |
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
# net | |
tcpdump -nnn -s 0 -i eth0 -A '(tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)' | |
# sql | |
tcpdump port 3306 -s 65535 -x -n -q -tttt > /root/tcpdump.out | |
pt-query-digest --type=tcpdump /root/tcpdump.out | less |
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
socat TCP-LISTEN:80,fork TCP:127.0.0.1:8000 |
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
# !!!! this unit cantbe started as gives me error. I think something wrong with command line syntax ssh key is treated as parameter.. | |
[Unit] | |
Description=Dokku in Docker | |
After=etcd.service | |
After=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
ExecStartPre=-/usr/bin/docker kill dokku | |
ExecStartPre=-/usr/bin/docker rm dokku |
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
# swith to sudo | |
sudo -i | |
# create swap | |
touch /2GiB.swap | |
chattr +C /2GiB.swap | |
fallocate -l 2048m /2GiB.swap | |
chmod 600 /2GiB.swap | |
mkswap /2GiB.swap |
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 log --pretty=format:"%h %cd %s" --graph --since=1.days | |
more at: http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History |
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/bash | |
rows='6' | |
frameW='300' | |
frameH='300' | |
fileName='sheet.png' | |
echo "Generator of sprite sheet" | |
# read rows |
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
# 95 - 9 is commpression level, 5 is adaptive compression type | |
mogrify -resize 150% -quality 95 *.png |
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
CREATE DATABASE duplicateddb; | |
mysqldump -h host -u admin -p originaldb | mysql -h host -u backup -ppassword duplicateddb; |
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
$ sudo nano /etc/ld.so.conf.d/lib32.conf | |
#add line: | |
/usr/lib/i386-linux-gnu/mesa/ | |
#save | |
$ ldconfig -v |
NewerOlder