Skip to content

Instantly share code, notes, and snippets.

@pierew
pierew / ddpvdd.sh
Last active August 29, 2015 14:06
ddpvdd - A DD and PV Integration to use DD with Progress Bar
#!/bin/bash
echo "Input: $1"
size=$(du -k "$1" | cut -f 1)
size=$(($size/1024))
echo "Output: $2"
echo "Size: $size MB"
dd if="$1" | pv --size="$size"M | dd of="$2"
@pierew
pierew / blogtk-install.sh
Created May 20, 2014 15:13
blogtk-install.sh
#!/bin/bash
echo "Getting Root Access"
sudo -i
echo "Install Dependencies"
apt-get install python python-gtk2 python-gnome2 python-gtkspell python-gtksourceview2 python-feedparser python-gdata python-webkit -y
echo "Download Tarball"
wget https://launchpad.net/blogtk/2.0/2.0/+download/blogtk-2.0.tar.gz ~/blogtk.tar.gz
tar xvfz ~/blogtk.tar.gz ~/blogtk
cd ~/blogtk
make
@pierew
pierew / post-receive
Last active August 29, 2015 14:00
That is a Gitolite post-receive Hook Script that can Optional upload the Repository to an FTP Server or copy it to an Directory, more Features are following.
#!/bin/bash
# General Settings
REPONAME='example.git'
BRANCH='public' # Branch you want to be public
MODE='FTP' # 'FTP' = Upload to FTP Server / 'DIRECTORY' = Copy to Directory.
# DIRECTORY MODE SECTION
DIRECTORY='/var/www/'
EXCLUDELIST_DIR='' # Do '--exclude=Folder1 --exlude=Folder2'