Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastian Blask sblask

View GitHub Profile
View Understanding the output of rsync --itemize-changes
From: http://web.archive.org/web/20160904174444/http://andreafrancia.it/2010/03/understanding-the-output-of-rsync-itemize-changes.html
As you may know the rsync's --delete options if misused could make severe damage.
To prevent this you can use the --itemize-change and the --dry-run options to figure out how the command will behave before launching the real one.
The output will be something like that:
.d..t..g... ./
.f...p.g... Something.pdf
View Get SSL Certificate Information
import json
import socket
import ssl
ssl_socket = ssl.wrap_socket(socket.socket(), cert_reqs=ssl.CERT_REQUIRED, ca_certs='/etc/ssl/certs/ca-certificates.crt')
ssl_socket.connect(('google.com', 443))
print json.dumps(ssl_socket.getpeercert(), indent=4)
View Skip Redirect Whitelist
http://redir.xing.com/link/*
https://slack-redir.net/link*
https://*.facebook.com/l.php*
https://deref-gmx.net/mail/client/*
https://outgoing.prod.mozaws.net/*
https://www.google.com/url*
View .xinputrc
# decrease speed
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Profile" 6
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Velocity Scaling" 1
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Constant Deceleration" 7
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Adaptive Deceleration" 60
# set mouse scroll speed
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Evdev Wheel Emulation Inertia" 100
View clone_init
curl --silent https://api.github.com/users/sblask/repos | jq --raw-output ".[] | .ssh_url" | xargs -L 1 git clone
View Mount NAS
install nfs-common
sudo mkdir --parents /mnt/nfs/nas
sudo vim /etc/fstab
192.168.1.2:/data/Documents /mnt/nfs/nas/Documents nfs auto,bg,noatime,nolock 0 0
192.168.1.2:/data/Music /mnt/nfs/nas/Music nfs auto,bg,noatime,nolock 0 0
192.168.1.2:/data/Pictures /mnt/nfs/nas/Pictures nfs auto,bg,noatime,nolock 0 0
192.168.1.2:/data/Transmission /mnt/nfs/nas/Transmission nfs auto,bg,noatime,nolock 0 0
192.168.1.2:/data/Videos /mnt/nfs/nas/Videos nfs auto,bg,noatime,nolock 0 0
@sblask
sblask / Image Forward Regexp
Created Aug 14, 2015
Enhanced value for the extensions.imageforward.linkURLRegExp setting of https://addons.mozilla.org/en-US/firefox/addon/image-forward/
View Image Forward Regexp
(^[^#\?]+\.(jpg|jpeg|png)((#|\?).*)?$|^[^#\?]+(#|\?).+\.(jpg|jpeg|png)(&;#)?.*$)
View vagrant_trusty
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "trusty"
View vagrant_precise
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise"