Skip to content

Instantly share code, notes, and snippets.

# $Id$ generated with make-mac-prefixes.pl
# Original data comes from http://standards.ieee.org/regauth/oui/oui.txt
# These values are known as Organizationally Unique Identifiers (OUIs)
# See http://standards.ieee.org/faqs/OUI.html
# We have added a few unregistered OUIs at the end.
000000 Xerox
000001 Xerox
000002 Xerox
000003 Xerox
000004 Xerox

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@viegelinsch
viegelinsch / munin-update-manually.sh
Created February 20, 2015 16:14
run munin-update manually as root
!#/bin/bash
su - munin --shell=/bin/bash
/usr/share/munin/munin-update
exit

Nginx

user  nobody;
# no need for more workers in the proxy mode
worker_processes  4;
error_log  /var/log/nginx/error.log warn;
worker_rlimit_nofile 20480;
events {
	worker_connections 4048; # increase for busier servers
@ragusa87
ragusa87 / android-authenticator2-extract-qrcode.sh
Created May 27, 2015 21:36
Extract data from android backup of Google Authenticator 2 to qrcodes
#!/bin/bash
# Extract data from nandroid backup of Google Authenticator 2
# > /data/data/com.google.android.apps.authenticator2/databases/databases
# require: sqlite3 + qrencode
sqlite3 databases <<!
.headers off
.mode csv
.output codes.csv
select printf("otpauth://totp/%s?secret=%s&issuer=%s",email,secret,issuer) from accounts;
@ArseniyShestakov
ArseniyShestakov / gpu-hotplug.md
Last active May 3, 2024 05:54
Current QEMU dual-VM configuration. Thanks to everyone who helped me!

Check it's working

DRI_PRIME=1 glxinfo | grep OpenGL

Unbind AMD GPU from Radeon driver

echo "1002 6719" > /sys/bus/pci/drivers/vfio-pci/new_id echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind echo "0000:01:00.0" > /sys/bus/pci/drivers/vfio-pci/bind echo "1002 6719" > /sys/bus/pci/drivers/vfio-pci/remove_id echo "1002 aa80" > /sys/bus/pci/drivers/vfio-pci/new_id echo "0000:01:00.1" > /sys/bus/pci/devices/0000:01:00.1/driver/unbind

@eldondev
eldondev / cmd
Last active December 4, 2023 16:33
Because everyone needs a good preseed
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
cp -nv ~/.ssh/id_rsa.pub .
qemu-system-x86_64 -machine accel=kvm -kernel linux -initrd initrd.gz -m 1G -smp 2 -append "blacklist=vga16fb fb=false video=false vga=normal auto=true url=http://10.0.2.10:8080/debian-preseed.txt hostname=otto domain=" -net user,guestfwd=:10.0.2.10:8080-cmd:"/bin/busybox httpd -i" -hda /dev/shm/deb.img -net nic -display none
@Koronen
Koronen / 20-thinkpad.conf
Last active January 7, 2020 20:04
Thinkpad X220 tweaks
# /usr/share/X11/xorg.conf.d/20-thinkpad.conf
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|ThinkPad Compact USB Keyboard with TrackPoint|USB Trackpoint pointing device"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
@chuckwagoncomputing
chuckwagoncomputing / excuses.sh
Created November 28, 2015 01:14
BOFH excuses
#!/usr/bin/env bash
EXCUSES="/path/to/excuses.txt"
awk 'NR=='$((1 + $RANDOM % `nl $EXCUSES | tail -n 1 | awk '{print $1}' `))'{print;exit}' $EXCUSES
@uyorum
uyorum / boot.ipxe
Last active December 2, 2022 01:14
Preseed for Debian stretch (Replace "root-password-crypted" line)
#!ipxe
dhcp
initrd http://ftp.jp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
kernel http://ftp.jp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux auto=true priority=critical url=http://${dhcp-server}/preseed.cfg suite=stretch
boot