This file contains 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 | |
# set screen brightness | |
B_VAL=40 | |
if [ "$#" -gt "0" ]; then | |
B_VAL="$1" | |
fi | |
sudo bash -c "echo \"${B_VAL}\" > /sys/class/backlight/intel_backlight/brightness" |
This file contains 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
# @server1 | |
# back up database to file: | |
mysqldump -u dbUser --password=dpPassword --quick dbName | gzip > /home/user/backup.gz | |
# @server2 | |
# copy from other server | |
scp server1:/home/user/backup.gz ./ | |
# restore from file: |
This file contains 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
REM start editor with elevated privileges so you can edit the hosts file | |
powershell -Command "Start-Process 'C:\Windows\System32\notepad.exe' 'C:\Windows\System32\drivers\etc\hosts' -Verb runAs" |
This file contains 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
# DELETE ALL .NEF files from a folder for which no corresponding .JPG file exists | |
# useful for cleaning up when shooting in "RAW+JPG" mode, and then sorting out via checking the JPGs | |
# prompts every time before deleting | |
RDIR=./; for FILE in `ls ${RDIR}*.NEF`; do jpg=`basename $FILE .NEF`.JPG; if [[ ! -f $jpg ]]; then rm -i $FILE; fi; done | |
# same thing but the raw files are stored in a subfolder called 'raw' | |
RDIR=./raw/; for FILE in `ls ${RDIR}*.NEF`; do jpg=`basename $FILE .NEF`.JPG; if [[ ! -f $jpg ]]; then rm -i $FILE; fi; done |
This file contains 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
# Filename: /etc/zsh/zshrc | |
# Purpose: config file for zsh (z shell) | |
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org> | |
# Bug-Reports: see http://grml.org/bugs/ | |
# License: This file is licensed under the GPL v2. | |
################################################################################ | |
# This file is sourced only for interactive shells. It | |
# should contain commands to set up aliases, functions, | |
# options, key bindings, etc. | |
# |
This file contains 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
# transfer single large file (continue after abort - no change checking!) | |
# also limits bandwith to not saturate uplink | |
rsync -avz --append --bwlimit=200 file.zip server:/target/folder/ | |
# keep partial files on abort | |
rsync -avzP file.zip server:/target/folder/ | |
# transfer via checksum check (chunked), supports resuming and continuing changed files (changes will be detected) | |
rsync -avzPc file.zip server:/target/folder/ |
This file contains 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
Mar 7 17:48:51 paulbook3 kernel: [ 7192.099016] tpm_tis 00:04: Error (28) sending savestate before suspend | |
Mar 7 17:48:51 paulbook3 kernel: [ 7192.099023] __pnp_bus_suspend(): tpm_pm_suspend+0x0/0x1b0 returns 28 | |
Mar 7 17:48:51 paulbook3 kernel: [ 7192.099025] dpm_run_callback(): pnp_bus_suspend+0x0/0x20 returns 28 | |
Mar 7 17:48:51 paulbook3 kernel: [ 7192.099028] PM: Device 00:04 failed to suspend: error 28 | |
Mar 7 17:48:51 paulbook3 kernel: [ 7192.099030] PM: Some devices failed to suspend, or early wake event detected | |
Mar 7 17:48:51 paulbook3 kernel: [ 7192.104247] sd 0:0:0:0: [sda] Starting disk |
This file contains 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
// copy of https://github.com/leonarf/radioRaspberry/blob/master/src/resetLibusb.c | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <libusb-1.0/libusb.h> | |
//compile: gcc usbreset.c -o usbreset -lusb-1.0 | |
//usage: ./usbreset 2 6 | |
//use lsusb to check out the bus number and device number | |
struct libusb_device_handle *devh; |
This file contains 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 -e | |
echo "Adding Windows to GRUB 2 menu" | |
cat << EOF | |
menuentry "Windows" { | |
exit | |
} | |
EOF | |
## to activate this run: | |
## sudo grub-mkconfig -o /boot/grub/grub.cfg |
This file contains 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
URxvt*transparent: true | |
URxvt*tintColor: #222222 | |
URxvt*shading: 80 | |
URxvt*saveLines: 12000 | |
URxvt*foreground: White | |
URxvt*background: #000000 | |
#URxvt*font: xft:Bitstream Vera Sans Mono:pixelsize=12:antialias=true:hinting=true | |
#URxvt*boldFont: xft:Bitstream Vera Sans Mono:bold:pixelsize=12:antialias=true:hinting=true | |
URxvt*font: xft:DejaVu Sans Mono:pixelsize=12:antialias=true:hinting=true | |
URxvt*boldFont: xft:DejaVu Sans Mono:bold:pixelsize=12:antialias=true:hinting=true |