git rev-parse --abbrev-ref HEAD
git symbolic-ref --short HEAD #probably works for 1.8 and newer clients
#!/bin/bash | |
# more at http://www.techgaun.com/2014/06/postgresql-backup-to-amazon-s3-on.html | |
if [ $OPENSHIFT_POSTGRESQL_DIR ]; then | |
/usr/bin/envdir /etc/wal-e.d/env /bin/wal-e backup-push ${OPENSHIFT_POSTGRESQL_DIR}data | |
fi |
{ | |
"title": "Apache logs", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "*", | |
"alias": "", | |
"color": "#7EB26D", | |
"id": 0, |
/usr/bin/docker -d -D |
docker ps -a | grep Exited | cut -d" " -f1 | xargs --no-run-if-empty docker rm |
wget -r -nH -m --ftp-user=<ftp_user> --ftp-password=<ftp_pwd> ftp://<ftp_server>/ |
#!/bin/bash | |
for x in `ps -ef| awk '{ print $2 }'`; | |
do | |
echo "pid:${x} process_name:$(cat /proc/$x/cmdline) count:$(ls -1U /proc/$x/fd | wc -l)" | column -t; | |
done |
tar -xvf file.tar.gz --wildcards --no-anchored "<file_name>" -C /home/samar/path/to/extract/ |
virsh setmem guest-name <new-memory-in-KB> |
#!/bin/bash | |
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel | |
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.20.tar.gz | |
tar xfz ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.20.tar.gz | |
cd GraphicsMagick-1.3.20 | |
./configure | |
make | |
make install |