Skip to content

Instantly share code, notes, and snippets.

View patsbin's full-sized avatar

Patrick Willms patsbin

View GitHub Profile
@patsbin
patsbin / gist:6794582
Created October 2, 2013 14:25
Entry in /etc/fstab to mount a samba share with whitespace in the name.
//IP/Netzwerk\040Freigabe /mnt/ziel cifs noauto,users,uid=1000,gid=100,file_mode=0755,dir_mode=0750,iocharset=utf8,credentials=~/.smbcredentials 0 0
@patsbin
patsbin / gist:6826265
Created October 4, 2013 13:54
Copying multiple folders with whitespaces in the name from a remote machine to a local location using rsync.
rsync -rnhv --progress user@"remote:/path/to\ file" :"/another/path/to\ file" /path/to/dest
@patsbin
patsbin / gist:6989513
Created October 15, 2013 10:18
Convert partition from type dynamic for windows 7 installation
diskpart
list disk
select disk <disknumber>
convert dynamic
@patsbin
patsbin / gist:7026252
Created October 17, 2013 14:47
ICMP Echo Reply unter Windows 7 erlauben. Alternativ: Control Panel --> System and security --> Windows Firewall --> Advanced settings --> Inbound rules --> New rule --> custom rule in Protocol and ports: Protocol: ICMPv4 on the same panel go to customize, choose "Specific ICMP types", check the box "echo request"
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
@patsbin
patsbin / gist:7096646
Created October 22, 2013 07:44
Using htop to see per device action. See also: iotop
htop
F5 (Tree view)
F2 (Setup)
Select columns
Select RBYTES WBYTES
F10 (Done)
@patsbin
patsbin / gist:7099104
Created October 22, 2013 11:36
Tunnel the mic input from home through ssh and play on your local machine
ssh home arecord -f S16_LE -D hw:1,0 -c1 | aplay -f S16_LE -r 44100 -t wav
@patsbin
patsbin / gist:8317778
Created January 8, 2014 14:39
Use integrated webcam to generate screenshots
lsusb
to find device
lsusb -s 001:007 -v | egrep "Width|Height"
to find resolutions
fswebcam -d /dev/video0 --input 0 --no-banner --resolution 1280x720 --save $(date +%Y_%m_%d_%H:%M).jpg
@patsbin
patsbin / INSTALL.md
Created February 21, 2014 10:03 — forked from namuol/INSTALL.md

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@patsbin
patsbin / gist:10446272
Created April 11, 2014 07:18
Quick hack to save the current IP of a system as a file on a remote host. No checks implemented.
#!/bin/sh
#
# Simple cron job to get the public ip
curl ipv4.icanhazip.com > ~/ip && rsync ~/ip remote:/tmp/
echo Current IP: $(cat ~/ip) | logger -t IPUpdater
rm ~/ip
~
~
~
@patsbin
patsbin / gist:4bcef9206de2f660304a
Created July 17, 2014 06:19
System-Backup using Windows Server systemtools
@echo off
net use \\BACKUP Passw0rd /user:backup_user
C:\Windows\System32\wbadmin.exe start backup -backupTarget:\\BACKUP\Sicherung -allCritical -vssFull -systemState -quiet