Skip to content

Instantly share code, notes, and snippets.

View xenithorb's full-sized avatar

Michael Goodwin xenithorb

View GitHub Profile
#!/bin/bash
#
# Intended to be used as a cron script in order to
# update and manage a host-blocking conf-file for
# unbound DNS resolver.
#
#set -x
REMOTE_HOST_LISTS=(
"http://winhelp2002.mvps.org/hosts.txt"
#!/bin/bash
#set -x
#
# Usage: ./dl_yt_playlist.sh "https://<youtube_playlist>" [<folder>]
# By default downloads highest quality audio to current dir
#
# IMPORTANT: Must use quotes on the commandline, the URI contains &!
#
# IMPORTANT: Expects a dedicated directory for the playlist
# You can specify a nonexistant directory and it will create one
@xenithorb
xenithorb / 99-nvidia_custom.conf
Last active May 30, 2016 06:30
Nvidia config for Visio TV and 61Hz, having the effect of disabling the preprocessor and enabling 4:4:4 chroma
Custom X11 config for VIZIO TV to force 4:4:4 chroma by
# tricking the pixel clock into turing the tv pre-processor off
Section "Device"
Identifier "Device0"
Driver "nvidia"
Option "UseEdidDpi" "False"
Option "ColorSpace" "RGB"
Option "ColorRange" "Full"
Option "DPI" "96 x 96"
@xenithorb
xenithorb / rc.local
Last active June 14, 2022 21:25
OpenWRT rc.local post upgrade for C7 Archer - this belongs as /etc/rc.local
#!/bin/sh
# vim: filetype=sh
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
LUCI_THEME="material"
OPKG_INSTALL="
# kmod-ath10k
# ath10k-firmware-qca988x
luci
@xenithorb
xenithorb / get_bodhi_update.py
Last active April 18, 2016 14:23
Just upgrade packages for Bodhi Update ID
#!/usr/bin/env python3
#
# Usage:
# chmod +x get_bodhi_update.py
# sudo ./get_bodhi_update.py FEDORA-2016-d67632bb64
#
import sys, json, requests, subprocess
bodhi_server = "https://bodhi.fedoraproject.org/updates/"
bodhi_id = sys.argv[1]
@xenithorb
xenithorb / setup-monitor-pulseaudio.sh
Last active May 19, 2016 22:29
Setup 3x nvidia (same card) monitors for simultaneous output w/ pulseaudio on Fedora 23
#!/bin/bash
set -x
HOME="$( awk -v user="$SUDO_USER" -F':' '$1 == user { print $6 }' /etc/passwd )"
UDEV_RULE_FILE="/etc/udev/rules.d/nvidia-hdmi.rules"
HOME_CONF_PULSE="${HOME}/.config/pulse"
HOME_DEFAULT_PA="${HOME_CONF_PULSE}/default.pa"
HOME_DAEMON_CONF="${HOME_CONF_PULSE}/daemon.conf"
USR_SHARE_PULSE="/usr/share/pulseaudio/alsa-mixer/profile-sets"
USR_SHARE_PULSE_PROFILE_NAME="nvidia-hdmi.conf"
USR_SHARE_PULSE_PROFILE="${USR_SHARE_PULSE}/${USR_SHARE_PULSE_PROFILE_NAME}"
@xenithorb
xenithorb / sopel.service
Created May 23, 2016 01:12
systemd unit files for sopel and weechat bouncer proxy
[Unit]
Description=Sopel IRC bot
After=network-online.target
[Service]
User=sopel
Restart=on-failure
WorkingDirectory=/home/sopel
ExecStart=/home/sopel/sopel/bin/sopel
@xenithorb
xenithorb / xorg.conf
Last active January 5, 2018 01:21
Current xorg.conf for a 3x 1080p monitor side-by-side setup (with the left most 90^o rotated)
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 364.15 (mockbuild@) Fri Apr 8 12:50:17 CEST 2016
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
/* exported Script */
// Begin embedded images
const gh_cmit_svg = 'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGFyaWEtaGlkZGVuPSJ0cnVlIiBjbGFzcz0ib2N0aWNvbiBvY3RpY29uLWdpdC1jb21taXQiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDE0IDE2IiB3aWR0aD0iMTQiPjxwYXRoIGQ9Ik0xMC44NiA3Yy0uNDUtMS43Mi0yLTMtMy44Ni0zLTEuODYgMC0zLjQxIDEuMjgtMy44NiAzSDB2MmgzLjE0Yy40NSAxLjcyIDIgMyAzLjg2IDMgMS44NiAwIDMuNDEtMS4yOCAzLjg2LTNIMTRWN2gtMy4xNHpNNyAxMC4yYy0xLjIyIDAtMi4yLS45OC0yLjItMi4yIDAtMS4yMi45OC0yLjIgMi4yLTIuMiAxLjIyIDAgMi4yLjk4IDIuMiAyLjIgMCAxLjIyLS45OCAyLjItMi4yIDIuMnoiPjwvcGF0aD48L3N2Zz4=';
const gh_pr_svg = 'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGFyaWEtaGlkZGVuPSJ0cnVlIiBjbGFzcz0ib2N0aWNvbiBvY3RpY29uLWdpdC1wdWxsLXJlcXVlc3QiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDEyIDE2IiB3aWR0aD0iMTIiPjxwYXRoIGQ9Ik0xMSAxMS4yOFY1Yy0uMDMtLjc4LS4zNC0xLjQ3LS45NC0yLjA2QzkuNDYgMi4zNSA4Ljc4IDIuMDMgOCAySDdWMEw0IDNsMyAzVjRoMWMuMjcuMDIuNDguMTEuNjkuMzEuMjEuMi4zLjQyLjMxLjY5djYuMjhBMS45OTMgMS45OTMgMCAwIDAgMTAgM
@xenithorb
xenithorb / weechat@.service
Last active January 30, 2018 18:39
This is an instanced service, usage: `systemctl enable weechat@<user>` will start a tmux session with weechat for the <user>
# /etc/systemd/system/weechat@.service
[Unit]
Description=Weechat bouncer
After=network-online.target
[Service]
User=%i
Environment=SOCKET_NAME=%p
Environment=LC_CERT_FILE=/etc/letsencrypt/live/%H/all.pem
Environment=LOCAL_CERT_PATH=/home/%i/.weechat/ssl