View 501-ath_regd_param.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/drivers/net/wireless/ath/regd.c | |
+++ b/drivers/net/wireless/ath/regd.c | |
@@ -23,6 +23,10 @@ | |
#include "regd.h" | |
#include "regd_common.h" | |
+static char *default_country_alpha2 = NULL; | |
+module_param_named(default_country, default_country_alpha2, charp, S_IRUGO); | |
+MODULE_PARM_DESC(default_country, "Default Country Code (ISO 3166-1 Alpha-2)"); | |
+ |
View eap1300_to_eap1300ext.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
in_file = sys.argv[1] | |
lower = in_file.lower() | |
if 'eap1300ext' in lower or 'eap1300' not in lower: | |
raise ValueError('This does not look like an EAP1300 firmware file name.') |
View mx_it_up.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In your browser, add a new bookmark with the following in the URL | |
// field and name it "Mx it up" (or whatever you fancy). This is known | |
// as a "bookmarklet" - if you select it from the bookmarks menu it | |
// will run on the page you currently have open. | |
javascript:(D=>{D.querySelectorAll("option[value^=mrs i]").forEach(N=>{for(var r=D.createElement("option"),p=N.parentNode,o=p.children,t=0;t<o.length;++t)if(/^mx/i.test(o[t].value))return o[t].selected=!0;r.value=r.innerText=N.value.replace(/rs/i,s=>"R"==s[0]?"X":"x"),p.appendChild(r),r.selected=!0})})(document) |
View idleshut.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IDLES=0 | |
while sleep 30 | |
do | |
PCT=`top -bn 2 -d 0.1 | grep '^%Cpu' | tail -n 1 | tr :. ' ' | awk '{print$2}'` | |
if [ $PCT -lt 10 ] | |
then | |
IDLES=$[$IDLES+1] | |
else |
View .gitaliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# https://stackoverflow.com/a/52913660/370695 | |
branch-local = "symbolic-ref --short HEAD" # https://stackoverflow.com/a/19585361/5353461 | |
branch-fetch = "!f(){ br=\"$(git branch-local \"$@\")\" && git config branch.\"$br\".remote || echo origin; };f" | |
branch-push = "!f(){ br=\"$(git branch-local \"$@\")\" && git config branch.\"$br\".pushRemote || git config remote.pushDefault || git branch-fetch; };f" | |
# shortcuts | |
st = status | |
sh = show | |
ci = commit | |
co = checkout |
View ansi-player.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: 0BSD OR MIT-0 OR Unlicense OR CC0-1.0+ | |
// Copyright © 2022 Ryan Castellucci, no rights reserved | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <time.h> |
View find_mastodon.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def _pylib(): | |
import sys | |
from pathlib import Path | |
pylib = Path(Path.home(), 'code', 'pylib') | |
if pylib.is_dir(): | |
sys.path.append(str(pylib.resolve())) | |
_pylib() |
View manip2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import re | |
import sys | |
import zlib | |
import base64 | |
import subprocess | |
from hashlib import sha1 |
View venv_exec.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def venv_exec(): | |
import os, sys | |
from pathlib import Path | |
basedir = Path(__file__).parent.resolve() | |
executable = Path(sys.executable) | |
try: executable.relative_to(basedir) | |
except ValueError as e: | |
p = next(basedir.glob('*/bin/python3')) | |
os.environ['VIRTAUL_ENV'] = str(p.parent.parent) |
View followups.dtl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% block followups %} | |
{% set dir = page.components | slice(end=-1) | join(sep="/") %} | |
{% set parent = page.ancestors | last %} | |
{% set section = get_section(path=parent) %} | |
{% set followups = [] %} | |
{% set a = page.extra.followup_groups | default(value=[]) | sort %} | |
{% set a_sz = a | length %} | |
{# Add explicitly listed pages to follow-up list. #} | |
{% for stem in page.extra.followups | default(value=[]) %} |
NewerOlder