Skip to content

Instantly share code, notes, and snippets.

@BtbN
BtbN / etcsystemdsystemrtorrent@.service
Created August 6, 2019 09:24
/etc/systemd/system/rtorrent@.service
[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
@BtbN
BtbN / configuration.xml
Created June 13, 2018 18:26
Office 2016 Professional Plus Retail No-Bullshit Config for deployment tool
<Configuration>
<Add OfficeClientEdition="64" Channel="Monthly" Branch="Current">
<Product ID="ProPlusRetail">
<Language ID="de-de" />
<ExcludeApp ID="OneDrive" />
<ExcludeApp ID="Access" />
<ExcludeApp ID="Lync" />
<ExcludeApp ID="Outlook" />
<ExcludeApp ID="InfoPath" />
<ExcludeApp ID="Groove" />
#!/usr/bin/env python3
import os
import sys
import time
import signal
from twitch import TwitchClient
os.chdir(os.path.dirname(os.path.abspath(__file__)))
class AlarmException(Exception):
@BtbN
BtbN / Makefile
Created December 15, 2017 20:23
Makefile
PREFIX = /usr/local
LIBDIR = lib
INSTALL = install
SED = sed
all:
$(SED) 's#@@PREFIX@@#$(PREFIX)#' ffnvcodec.pc.in > ffnvcodec.pc
install: all
$(INSTALL) -m 0755 -d '$(DESTDIR)$(PREFIX)/include/ffnvcodec'