Skip to content

Instantly share code, notes, and snippets.

#
# Installs git 1.7.10 on Ubuntu 12.04 (Precise) using packages from
# the upcoming 12.10 (Quantal) release. Should work for i386 and amd64.
#
# Adapted from http://pastebin.com/TXeMw1CY
sudo apt-get install dpkg-dev
HOST_ARCH=`dpkg-architecture -qDEB_HOST_ARCH_CPU`
@bse666
bse666 / check-process-running.sh
Last active August 29, 2015 14:18
check-process-running
# by: http://stackoverflow.com/questions/2903354/bash-script-to-check-running-process
pgrep procname && echo Running
pgrep procname || echo Not running
killall -q -0 procname && echo Running
pidof procname && echo Running
@bse666
bse666 / monitor_dual.au3
Last active August 29, 2015 14:26
Switch Monitor Configuration easily in Windows (DE) with this autoit scripts.
Run("C:\WINDOWS\system32\control.exe desk.cpl", "C:\Windows\system32\")
WinWait("Bildschirmauflösung")
ControlClick("Bildschirmauflösung", "", "Button3")
selectmon('MD6155AN')
ControlCommand("Bildschirmauflösung", "", "ComboBox3", "SetCurrentSelection", "1")
selectmon('MD32119PR')
ControlCommand("Bildschirmauflösung", "", "ComboBox3", "SetCurrentSelection", "2")
@bse666
bse666 / tmux_from_git.sh
Last active May 19, 2016 07:54
install tmux from git in ubuntu (tested in 15.04)
#!/bin/sh
tdir=`mktemp -d`
cd $tdir
sudo apt-get install -y --force-yes libevent-dev libncurses-dev pkg-config autoconf
git clone https://github.com/tmux/tmux
cd tmux
autoreconf -fis
./configure
make
sudo make install
@bse666
bse666 / steam_requirements.sh
Created September 11, 2015 19:26
steam (x)|u|buntu install
sudo apt-get install libgl1-mesa-dri-lts-trusty:i386 libgl1-mesa-glx-lts-trusty:i386 libc6:i386
#!/bin/bash
# install java 8_65
sudo mkdir /opt/Oracle_Java
sudo wget -qO- --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jre-8u65-linux-x64.tar.gz | tar xvz -C /opt/Oracle_Java/
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/Oracle_Java/jre1.8.0_65/bin/java" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/Oracle_Java/jre1.8.0_65/bin/javaws" 1
sudo update-alternatives --set "java" "/opt/Oracle_Java/jre1.8.0_65/bin/java"
sudo update-alternatives --set "javaws" "/opt/Oracle_Java/jre1.8.0_65/bin/javaws"
# mozilla firefox
@bse666
bse666 / wmic_on_linux.sh
Created December 2, 2015 09:30
wmic on linux from source
#!/bin/sh
sudo apt-get install autoconf -y
cd ~/Downloads
wget http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2
tar -xvf wmi-1.3.14.tar.bz2
cd wmi-1.3.14
sudo make "CPP=gcc -E -ffreestanding"
sudo cp Samba/source/bin/wmic /usr/local/bin/
@bse666
bse666 / ubuntu-purge-unused-kernels.sh
Last active January 7, 2016 13:25
Purge unused Kernels on Ubuntu
#!/bin/bash [0/1863]
# /root/ubuntu-purge-unused-kernels.sh
# crontab:
# @reboot /root/ubuntu-purge-unused-kernels.sh
dpkg --get-selections | `#show all installed packages` \
grep 'linux-image-*' | `#select all installed images` \
awk '{print $1}' | `#select only package name)` \
egrep -v "linux-image-$(uname -r)|linux-image-generic" | `#remove current and base kernel from list` \
head -n -2 | `#remove two recent kernels from list` \
@bse666
bse666 / ubuntu-fix-mouse-sensitivity.sh
Created January 7, 2016 21:24
Fix Ubuntu Mouse Sensitivity
#!/bin/sh
xinput --set-prop "Razer DeathAdder" "Device Accel Constant Deceleration" 5
xinput --set-prop "Razer DeathAdder" "Device Accel Velocity Scaling" 1
xinput --set-prop "Razer DeathAdder" "Device Accel Profile" -1
@bse666
bse666 / install.sh
Last active July 20, 2016 10:03
latex Grundausstattung
sudo apt-get install -y kile texlive-lang-german okular texlive-latex-extra texlive-xetex