Skip to content

Instantly share code, notes, and snippets.

@antonpirker
antonpirker / show_contributors.sh
Created September 12, 2023 09:38
Show contributors with the most commits in Git repo
git log --since="3 years ago" --format='%aN <%aE>' | sort | uniq -c | sort -r

Keybase proof

I hereby claim:

  • I am antonpirker on github.
  • I am antonpirker (https://keybase.io/antonpirker) on keybase.
  • I have a public key ASAJGE8Uv052H-w1_OwZK-EjQMPP0RrLkiUpHoNnfRhlRAo

To claim this, I am signing this object:

0x369a7A8E40674B83fA5A47dD843B934e1c0aDCfF
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
gource --start-date '2015-06-01 00:00:00' --seconds-per-day 1 --camera-mode track --auto-skip-seconds 1
<html>
<head>
<script>
// Based on RFC 2822 section 3.2.4 / RFC 5322 section 3.2.3, these
// characters are permitted in email addresses (not taking into
// account internationalization):
var ATEXT = "a-zA-Z0-9_!#\\$%&\\'\\*\\+\\-\/=\\?\\^`\\{\\|\\}~";
// A "dot atom text", per RFC 2822 3.2.4:
@antonpirker
antonpirker / memory-consumption.sh
Created August 26, 2015 09:38
Memory consumption of user
ps -u <username> -o pid,rss,command | awk '{print $0}{sum+=$2} END {print "Total", sum/1024, "MB"}'
sudo apt-get remove $(dpkg -l|egrep '^ii linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)
# install pyenv
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
# setup pyenv and load when shell is loaded
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
# source the new bashrc
. ~/.bashrc
@antonpirker
antonpirker / convert-bw.sh
Created August 6, 2014 08:55
Convert all images in a directory tree recursively to gray scale and put them into out folder.
for f in `find . -name "*.jpg"`
do
#echo "mkdir -p `echo out$f | xargs dirname | sed "s/\.\//\//"`"
mkdir -p `echo out$f | xargs dirname | sed "s/\.\//\//"`
#echo "convert $f -set colorspace Gray -separate -average `echo out$f | sed -e "s/\.\//\//"`"
convert $f -set colorspace Gray -separate -average `echo out$f | sed -e "s/\.\//\//"`
done