I hereby claim:
- I am daks on github.
- I am daks (https://keybase.io/daks) on keybase.
- I have a public key whose fingerprint is A583 DC91 EE47 ABBC FF02 9D5A 8EB2 B426 5FBB C3A7
To claim this, I am signing this object:
# /etc/udev/rules.d/10-udev-disks.rules | |
# udev custom rule | |
# using # udevadm info -a -p $(udevadm info -q path -n /dev/sda1) | |
# I found the necessary information about my USB device | |
# and take the necessary ones to make it unique (idVendor, idProduct, serial here) | |
# when plugging the disk, nevermind the device name it gets (sda1, sdb1,...) udev creates /dev/mpd-disk and runs the script indicated | |
KERNEL=="sd?1",ATTRS{idVendor}=="xxxx",ATTRS{idProduct}=="yyyy",ATTRS{serial}=="zzzzzzzzzzzz",SYMLINK+="mpd-disk",RUN+="/root/bin/hdparm-mpd-disk.sh" |
# sometimes, when changing permission or ownership you run a command like | |
# chown -R www-data: .* | |
# and it does what you want correctly: change ownership on dotfiles | |
# but it does also what you don't want: change ownership on all files which are in the parent directory | |
# which is really bad | |
# the solution, taken from http://sysadminnotebook.blogspot.fr/2012/06/how-to-reset-folder-permissions-to.html | |
# 1. on a snapshot or another Debian installation run | |
find / -exec stat --format "chmod %a %n" {} \; > /tmp/restoreperms.sh |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# This file must be executable to work! chmod 755! | |
# | |
# The LUKS key must exist as a file at /etc/.keys/${device}.key | |
# Protect this directory: root as user/group, 400 as permissions | |
# | |
# Edit your autofs master file to include something like | |
# /mnt/crypt /etc/auto.luks --timeout=600 | |
# | |
# Then you can access your LUKS encrypted disk with |
This script helps you construct your albums per year list, using Last.fm top albums list.
You need Python, pylast and musicbrainzng.
Initialize your parameters like in the env.example file and 'source' it.
Work for me with squid 3.4 on debian jessie. | |
I use it with collectd exec plugin (https://collectd.org/documentation/manpages/collectd-exec.5.shtml) | |
to collect data from squid, send it over the network to influxdb and visualize with grafana. | |
Maybe someone will have some use of it. Good luck ;-) | |
https://gist.github.com/wrzasa/dfd7b554171159a6b2ab24b03b8e30b8/ |
The man doveadm-sync
pages are cryptic and not very well explained, as well they are missing quality real-world examples.
This gist aims to give some clarity and explanation.
Here is the command I got to successfully transfer (and sync backwards too) an email account from an old Dovecot email server to a new Dovecot email server:
To my knowledge, both servers must have a matching account already setup for this to work:
Configuration files for strongswan to create an IPSec tunnel between two peers: peer1 which has IP 192.168.231.1 and peer2 | |
with IP 192.168.231.2. | |
Tunnel will be established between those two IPs and each peer will have an in-tunnel network subnet of 10.0.1.0/24 for peer1 | |
and 10.0.2.0/24 for peer2. | |
swanctl configuration is used, and XFRM interfaces too |
In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).
The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.
My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [redis.io documentation](https://redis.io/do