Skip to content

Instantly share code, notes, and snippets.

View viegelinsch's full-sized avatar

viegelinsch viegelinsch

  • Germany
View GitHub Profile
# 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
# 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"
@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
@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 / 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 / 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 / brew pin
Created September 23, 2014 09:19
prevent homebrew package from being automatically updated
# brew pin [packagename]
brew pin qemu
@viegelinsch
viegelinsch / install_pisense
Created February 20, 2015 15:26
install pisense_ Raspberry Pi Munin monitoring
## Installation of https://github.com/perception101/pisense
sudo su -
mkdir /opt/munin-plugins
wget https://raw.githubusercontent.com/perception101/pisense/master/pisense_ -O /opt/munin-plugins/pisense_
chmod 0755 /opt/munin-plugins/pisense_
ln -s /usr/share/munin/plugins/pisense_ /etc/munin/plugins/pisense_clock
@viegelinsch
viegelinsch / munin-update-manually.sh
Created February 20, 2015 16:14
run munin-update manually as root
!#/bin/bash
su - munin --shell=/bin/bash
/usr/share/munin/munin-update
exit
@viegelinsch
viegelinsch / etc-kbd-config.patch
Created February 21, 2015 15:30
patch for /etc/kbd/config to prevent Raspberry Pi from sleeping
--- /etc/kbd/config 2015-02-21 16:24:59.653062112 +0100
+++ /etc/kbd/config.new 2015-02-21 16:24:28.554492138 +0100
@@ -38,7 +38,8 @@
# screen blanking timeout. monitor remains on, but the screen is cleared to
# range: 0-60 min (0==never) kernels I've looked at default to 10 minutes.
# (see linux/drivers/char/console.c)
-BLANK_TIME=30
+#BLANK_TIME=30
+BLANK_TIME=0