Skip to content

Instantly share code, notes, and snippets.

View kmf's full-sized avatar
🐧
Penguins make great Robots

Karl Fischer kmf

🐧
Penguins make great Robots
View GitHub Profile
@alexclifford
alexclifford / cinnamon-dconf-backup-and-restore.sh
Created September 15, 2016 07:53
Backup Cinnamon settings with dconf
# Backup
dconf dump /org/cinnamon/ > cinnamon-dconf-settings.txt
# Reset Cinnamon
dconf reset -f /org/cinnamon/
# Restore
dconf load /org/cinnamon/ < cinnamon-dconf-settings.txt
@lanrat
lanrat / NetworkManager.conf
Created July 12, 2016 01:19
NetworkManager ignore docker, virtualbox, and vmware adapters
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
[keyfile]
unmanaged-devices=interface-name:docker0;interface-name:vmnet1;interface-name:vmnet8;interface-name:vboxnet0
@totallyunknown
totallyunknown / ipmi_sensors_prometheus.py
Last active October 18, 2023 08:45
Prometheus Exporter for IPMI Sensor Status and Power usage
#!/usr/bin/env python
#
# Tested with SuperMicro
import re, subprocess, pprint, time, os, sys
if not os.path.exists("/usr/sbin/ipmi-sensors"):
print >> sys.stderr, 'freeipmi tools are not installed'
sys.exit()
@localghost666
localghost666 / private.xml
Last active October 30, 2020 15:48
Karabiner setting file for Logitech K360 & M545
<?xml version="1.0"?>
<root>
<!-- Logitech K360 Keyboard -->
<item>
<name>Logitech K360 Keyboard for Mac OS X</name>
<devicevendordef>
<vendorname>LOGITECH</vendorname>
<vendorid>0x046d</vendorid>
</devicevendordef>
<deviceproductdef>
@gene1wood
gene1wood / batch-delete-gmail-emails.js
Last active July 28, 2025 00:33
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts, will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 email threads in a single API call.
This script fetches 400 threads in case 500 threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete
@erichelgeson
erichelgeson / .kitchen.local.yml
Last active June 22, 2017 14:03
kitchen.local.yml cache chef package (simple)
driver:
synced_folders: [
["./chef-installer", "/tmp/chef-installer"]
]
provisioner:
chef_omnibus_url: file:///tmp/chef-installer/install.sh # curl can accept a local file:// url
#!/bin/bash
# Restart the GNOME shell by commandline via SSH. Similar to nohup.
# Copyright (C) 2013-2014 James Shubin
# Written by James Shubin <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@DavidWittman
DavidWittman / mongo-ansible.py
Last active April 18, 2023 18:16
MongoDB-backed dynamic inventory script for Ansible
#!/usr/bin/env python
#
# MongoDB-backed dynamic inventory script for Ansible
# http://docs.ansible.com/intro_dynamic_inventory.html
import os
from argparse import ArgumentParser
import pymongo

Debian on ThinkPad W540

This is a short write-up of my experiences with installing Debian on a ThinkPad W540.

All commands should be run as root, unless indicated otherwise.

Table of Contents

Debian Install Notes

@lisamelton
lisamelton / transcode-video.sh
Last active April 29, 2025 20:17
Transcode video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popular online downloads.
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.13 of April 8, 2015