Skip to content

Instantly share code, notes, and snippets.

# 95 - 9 is commpression level, 5 is adaptive compression type
mogrify -resize 150% -quality 95 *.png
@kacinskas
kacinskas / gist:f375df067ee860af7560
Last active August 29, 2015 14:02
Script to generate animation sprite sheet from images
#/usr/bin/bash
rows='6'
frameW='300'
frameH='300'
fileName='sheet.png'
echo "Generator of sprite sheet"
# read rows
@kacinskas
kacinskas / GIT log
Created August 14, 2014 08:53
git log --pretty=format:"%h %cd %s" --graph --since=1.days
$ 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
# 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 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
socat TCP-LISTEN:80,fork TCP:127.0.0.1:8000
# 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
httpry -i eth0 -s