Skip to content

Instantly share code, notes, and snippets.

View viegelinsch's full-sized avatar

viegelinsch viegelinsch

  • Germany
View GitHub Profile
@viegelinsch
viegelinsch / etc-default-grub
Last active August 29, 2015 14:05
Ubuntu 14.04 server - reboot (grub) hangs
problem: your server hangs on reboot
symptom: grub shows menu and waits for an input
> /etc/default/grub
contains the lines
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
@viegelinsch
viegelinsch / colourful_less
Last active August 29, 2015 14:05
colorful less
*cool thing* from http://linux-tips.org/article/78/syntax-highlighting-in-less
apt-get install source-highlight
add this on the bottom of .bashrc
# he: some colour for less
export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s"
export LESS=' -R '
et voilá ...
@viegelinsch
viegelinsch / install duply
Last active December 24, 2015 13:49
install 'duply' on Ubuntu
apt-get install duply python-paramiko
mkdir /etc/duply
duply backupname create
@viegelinsch
viegelinsch / brew_update_force
Last active December 18, 2015 07:49
force "brew update"
taken from: https://github.com/mxcl/homebrew/issues/11448
cd `brew --prefix`
git remote add origin https://github.com/mxcl/homebrew.git
git fetch origin
sudo git reset --hard origin/master
# Add list of files that Git should not compress
EXTENSIONS="jpg jpeg png tiff gif flac mp3 ogg oga avi mov mpg mpeg mkv ogv ogx webm zip gz bz bz2 rpm deb tgz rar ace 7z pak iso dmg"
for EXTENSION in $EXTENSIONS; do
sleep 0.05
echo -ne " -> echo \"*.$EXTENSION -delta\" >> trans/info/attributes \r"
echo "*.$EXTENSION -delta" >> "trans/info/attributes"
sleep 0.05
EXTENSION_UPPERCASE=`echo $EXTENSION | tr '[:lower:]' '[:upper:]'`
echo -ne " -> echo \"*.$EXTENSION_UPPERCASE -delta\" >> trans/info/attributes \r"
echo "*.$EXTENSION_UPPERCASE -delta" >> "trans/info/attributes"
# creating a private git repository to use with SparkleShare
cd Documents/
# let's name it "trans"
git init --bare trans
git config --file trans/config receive.denyNonFastForwards true
bash /tmp/add_attributes.sh
less trans/info/attributes
cd ..
chmod --recursive o-rwx Documents