Skip to content

Instantly share code, notes, and snippets.

@BtbN
BtbN / # zfs get -H -o value keystatus;
Created January 9, 2020 21:31
# zfs get -H -o value keystatus;
# zfs get -H -o value keystatus
-
available
available
available
available
available
available
available
available
@BtbN
BtbN / etcportagepatchessys-kernelgentoo-sourcesexport_kernel_fpu_functions.patch
Created October 6, 2019 18:56
/etc/portage/patches/sys-kernel/gentoo-sources/export_kernel_fpu_functions.patch
From 245e0f743d814c9ff2d1c748175e321301eb16cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <[email protected]>
Date: Thu, 2 May 2019 05:28:08 +0100
Subject: [PATCH] x86/fpu: Export __kernel_fpu_{begin,end}()
This partially undo commit:
12209993 x86/fpu: Don't export __kernel_fpu_{begin,end}()
We need this symbol in zfs for AES-NI/AVX support.
@BtbN
BtbN / etccron.ddailyjobs
Created September 26, 2019 09:14
/etc/cron.d/dailyjobs
# Global variables
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
9 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily
19 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
[Unit]
Description=rTorrent
After=network.target
[Service]
Type=forking
KillMode=none
User=%I
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent
@BtbN
BtbN / ipmi-updater.py
Last active May 15, 2019 13:58 — forked from mcdamo/ipmi-updater.py
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@BtbN
BtbN / .bashrc.sh
Created April 14, 2019 17:13
Invoke Notepad++ from within WSL
function npp() {
args=()
for v in "$@"; do
if [[ "$v" == /mnt/?/* ]]; then
args+=( "${v:5:1}:${v:6}" )
else
args+=( "$v" )
fi
done
test -z "${args[*]}" && return
@BtbN
BtbN / hook.sh
Last active September 4, 2018 13:47
hook.sh
#!/bin/bash
function deploy_challenge {
# This hook is called once for every domain that needs to be
# validated, including any alternative names you may have listed.
#
# Parameters:
# - DOMAIN
# The domain name (CN or subject alternative name) being
# validated.
@BtbN
BtbN / twitterfeed.php
Created August 3, 2018 21:55 — forked from yimingliu/twitterfeed.php
Twitter JSON to Atom feed proxy for Twitter API 1.1
<?php
/*
Twitter JSON to Atom proxy for Twitter API 1.1 - @yliu
Original version by Russell Beattie ( https://gist.github.com/russellbeattie/3898467 )
Fork of upstream to remove use of short tags; add t.co expansion and URL formatting for feed reader
License: BSD
*/
date_default_timezone_set('America/Los_Angeles');
07-11 23:38:13.032 642 3454 E OMX-VDEC-1080P: vendor library not set in ro.vendor.extension_library
07-11 23:38:13.032 4886 4886 D AndroidRuntime: Shutting down VM
07-11 23:38:13.033 4886 4886 E AndroidRuntime: FATAL EXCEPTION: main
07-11 23:38:13.033 4886 4886 E AndroidRuntime: Process: com.android.phone, PID: 4886
07-11 23:38:13.033 4886 4886 E AndroidRuntime: java.lang.IllegalAccessError: Method 'void com.android.internal.telephony.Phone.restoreSavedNetworkSelection(android.os.Message)' is inaccessible to class 'com.qualcomm.qti.internal.telephony.QtiRadioCapabilityController' (declaration of 'com.qualcomm.qti.internal.telephony.QtiRadioCapabilityController' appears in /system/framework/qti-telephony-common.jar)
07-11 23:38:13.033 4886 4886 E AndroidRuntime: at com.qualcomm.qti.internal.telephony.QtiRadioCapabilityController.sendSubscriptionSettings(QtiRadioCapabilityController.java:562)
07-11 23:38:13.033 4886 4886 E AndroidRuntime: at com.qualcomm.qti.internal.telephony.QtiRa