This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget "https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz" | |
tar -xf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure | |
make | |
make verify | |
sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install build-essential cmake kdebase-workspace-dev libqjson-dev git libqca2-dev | |
git clone git://anongit.kde.org/kdeconnect-kde | |
cd kdeconnect-kde | |
cmake -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) ./ | |
make | |
sudo make install | |
qdbus org.kde.kded /kded loadModule kdeconnect | |
kbuildsycoca4 -noincremental |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## One line per log entry with merge graph | |
## (--decorate is implicit for newer git versions?): | |
#git log --graph --oneline --decorate | |
## | | |
## Add --branches --remotes --tags --merges to see entries for all of the | |
## corresponding refs, not only commits (--all for all refs). | |
## Format output with --pretty=tformat:'<format>' | |
## Interesting placeholders for oneline <format>: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nmap -sP 192.168.0.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration file for tmux >= 2.1 | |
# .tmux.conf gets automatically read if in user directory (~) | |
# use 256 colour terminal: | |
set -g default-terminal "screen-256color" | |
# enable mouse: | |
set -g mouse on | |
# Not needed in tmux 2.8? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install device-tree-compiler | |
wget https://raw.githubusercontent.com/raspberrypi/documentation/master/configuration/images/dt-blob.dts | |
# for example, set P1:26 (BCM pin 7) to active low (on Raspi B Rev2.0, in dts file from August): | |
awk 'NR==104{print " pin@p7 { function = \"output\"; termination = \"pull_down\"; }; // SPI_CE1_N (P1:26)"}1' dt-blob.dts > dt-blob-mod.dts | |
dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-mod.dts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://thinkpad-forum.de/threads/179658-Wine-Wimp | |
# The exe installer does not work. | |
# Workaround: extract msi from exe, install msi. | |
wine WiMP-3.1.0.1858-NO.exe /extract | |
wine msiexec /i 8840086/WiMP-3.1.0.1858-NO.msi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Read-only Root-FS for Raspian | |
# | |
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with | |
# overlayfs integrated in Linux Kernel >= 3.18. | |
# | |
# Originally written by Axel Heider (Copyright 2012) for Ubuntu 11.10. | |
# This version can be found here: | |
# https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash#Overlayfs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync -raXi --size-only /path/to/folder-to-backup/ /destinations/path/to/folder-to-backup | |
same as | |
rsync -rlptgoDXi --size-only /path/to/folder-to-backup/ /destinations/path/to/folder-to-backup | |
same as | |
rsync -rlptgoDXi --size-only /path/to/folder-to-backup /destinations/path/to | |
-r recursive | |
-l preserve links | |
-p preserve permissions (also updates permission on not transferred files) | |
-t preserve time (also updates time on not transferred files) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://tuxtweaks.com/2010/10/remove-old-kernels-in-ubuntu-with-one-command/ | |
dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -E "(image|headers)" | xargs sudo apt-get -y purge |
OlderNewer