Skip to content

Instantly share code, notes, and snippets.

View supercoffee's full-sized avatar

Benjamin Daschel supercoffee

View GitHub Profile
@supercoffee
supercoffee / readme.md
Last active February 14, 2023 17:06
IPMI Supermicro -- set fan speed low

Set fan speed to low on Truenas with Supermicro motherboard

Tasks > Init/Shutdown scripts

  • type: command
  • command: ipmitool raw 0x30 0x70 0x66 0x01 0x00 0x32
  • when: post init
@supercoffee
supercoffee / zoom-nuke.sh
Created April 8, 2020 23:57
Remove zoom.us app from mac
#!/usr/bin/env bash
pkill zoom.us
sudo rm -rf ~/Library/Application\ Support/zoom.us \
~/Library/Logs/zoom* \
~/Library/Caches/us.zoom* \
/Applications/zoom.us.app
@supercoffee
supercoffee / karabiner.json
Created April 1, 2020 18:10
Karabiner config for Touchbar MBP
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@supercoffee
supercoffee / mysql-snapshot.sh
Last active March 3, 2020 21:00
MySQL docker DB snapshot
#!/bin/bash
print_usage() {
echo "Usage: ./mysql-snapshot.sh <sqldump>"
}
real_path() {
OURPWD=$PWD
cd "$(dirname "$1")"
LINK=$(readlink "$(basename "$1")")
@supercoffee
supercoffee / ActivityMainBinding.java
Created November 20, 2019 17:22
Kotlin Data binding nullability
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package org.example.kotlin.databinding.databinding;
import android.databinding.DataBindingComponent;
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
### Keybase proof
I hereby claim:
* I am supercoffee on github.
* I am supercoffee (https://keybase.io/supercoffee) on keybase.
* I have a public key ASDDWrklt3mrhUOVSHr4ieCbIHDC-KLfYJTNIwXQQw6r6wo
To claim this, I am signing this object:
@supercoffee
supercoffee / adb-select.py
Created January 22, 2019 23:41
ADB select
#!/usr/bin/env python
import sys
import os
import subprocess
import os.path
def get_file_path():
return os.path.expanduser("~/.adb-select")
def filter_empty_line(line):
@supercoffee
supercoffee / file-limit-hax.sh
Created December 28, 2017 20:17
Increase open file limit on MacOS
#!/usr/bin/env bash
cat > /tmp/limit.maxfiles.plist << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
@supercoffee
supercoffee / com.github.ethminer.plist
Created December 23, 2017 00:31
LaunchDaemons to mine ethereum
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.ethminer</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
@supercoffee
supercoffee / karabiner.json
Last active April 19, 2018 06:31
Karabiner elements config
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {