Skip to content

Instantly share code, notes, and snippets.

@petrmvala
petrmvala / .gitattributes
Last active January 23, 2021 23:35
Playing with git diff
otherfile diff=differ
@petrmvala
petrmvala / deduplicate
Created December 26, 2020 15:49
Deduplicate files
#!/bin/bash
# Deduplicates files based on md5 hash
#
# Usage:
# ./deduplicate <directory_name>
#
#
# Output like:
# [DUPLICATE]: (./Documents/Olympus pics/Stockholm445.JPG) found in: (./Documents/P5310445.JPG)
#
@petrmvala
petrmvala / monitors.sh
Created October 23, 2020 15:48
Turn off individual inactive monitors in multi-monitor setup
#!/bin/bash
function get_monitors() {
xrandr --listactivemonitors | awk 'NR!=1{print $4}'
}
function dim_monitor() {
xrandr --output $1 --brightness 0
### Keybase proof
I hereby claim:
* I am petrmvala on github.
* I am petrvala (https://keybase.io/petrvala) on keybase.
* I have a public key ASDTY5k8245QmQD2Y5dmRPSkaOfHVmXhUKMneFb3R8dk-wo
To claim this, I am signing this object: