Skip to content

Instantly share code, notes, and snippets.

View whitelynx's full-sized avatar
😸

David H. Bronke whitelynx

😸
View GitHub Profile
@whitelynx
whitelynx / 90-pi-bluetooth.rules
Last active April 16, 2024 12:38
Adding Bluetooth support to ArchLinux ARM's Raspberry Pi 4 version
# /lib/udev/rules.d/90-pi-bluetooth.rules
# Copied from https://github.com/RPi-Distro/pi-bluetooth/blob/master/lib/udev/rules.d/90-pi-bluetooth.rules
# Raspberry Pi bluetooth module: enable routing of SCO packets to the HCI interface
ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bthelper@%k.service"
@whitelynx
whitelynx / 00-keyboard.conf
Last active June 26, 2020 16:44
Xorg configs
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,us,us,us"
Option "XkbModel" "pc105"
Option "XkbVariant" "dvorak,dvorak-intl,dvorak-alt-intl,"
Option "XkbOptions" "ctrl:nocaps,altwin:swap_lalt_lwin,lv3:ralt_switch,compose:lctrl,eurosign:5,terminate:ctrl_alt_bksp"
EndSection
@whitelynx
whitelynx / machine-info
Last active July 28, 2019 17:18
Sway error on Intel i965
Machine: Lenovo Yoga 900-13ISK (https://www.lenovo.com/us/en/laptops/yoga/yoga-900-series/Yoga-900-13/p/88YG9000571)
Video card: Intel i965
CPU: i7-6500U
OS: Manjaro Linux
@whitelynx
whitelynx / cVimrc.vim
Last active June 15, 2019 03:24
cVim configuration
set defaultnewtabpage
let barposition = "bottom"
let completionengines = ["duckduckgo", "wikipedia", "google", "google-images", "youtube"]
let defaultengine = "duckduckgo"
let blacklists = ["https://mail.google.com/*", "https://inbox.google.com/*", "http*://trello.com/*", "http*://checkvist.com/*", "http*://gingkoapp.com/*"]
"let hintcharacters = "ueoaihtnsdkjq;xmwvzbp.,'ygcrlf"
"let hintcharacters = "ueoaikjq;xp.,'yhtnsdmwvzbgcrlf"
"let hintcharacters = "ueoakjq;p.e,'ixyhtnsmwvzgcrldbf"
@whitelynx
whitelynx / r.bash
Created April 30, 2019 23:31
Generic "read" script that can list either directory contents or file contents.
#!/bin/bash
c_link=$(tput setaf 199)
c_dir=$(tput setaf 68)
c_file=$(tput setaf 155)
c_special=$(tput setaf 221)
c_dim=$(tput setaf 240)
c_norm=$(tput sgr0)
while [ $# -gt 0 ]; do
@whitelynx
whitelynx / keybase.md
Created October 3, 2018 15:13
Keybase identity proof

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@whitelynx
whitelynx / sabdc.bash
Created January 3, 2018 18:38
Stupid awk-based diff colorizer
#!/bin/bash
# sabdc
# Stupid awk-based diff colorizer
# Licensed under the MIT license:
# Copyright (c) 2011 David H. Bronke
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
''' WeasyPrint JPG test case
Testing:
# virtualenv virtenv
# virtenv/bin/pip install WeasyPrint
# virtenv/bin/python test-jpg.py
'''
import logging
''' WeasyPrint @font-face test cases
The following test cases are included:
- data-uri-separate-css.pdf: Specifying font src using data URI, using WeasyPrint's CSS class for stylesheet
- data-uri-included-css.pdf: Specifying font src using data URI, using CSS in HTML <style> tag
- google-font-separate-css.pdf: Specifying font src using https URI from Google Fonts, using WeasyPrint's CSS class for stylesheet
- google-font-included-css.pdf: Specifying font src using https URI from Google Fonts, using CSS in HTML <style> tag
Testing:
# virtualenv virtenv
@whitelynx
whitelynx / header-parse.js
Created May 29, 2014 22:33
Parse (mostly) RFC822-compliant headers.
//---------------------------------------------------------------------------------------------------------------------
// Parse (mostly) RFC822-compliant headers.
//
// This will parse header blocks that conform to [RFC822 Section 3][], as well as a few variations of that standard.
// One major deviation is that this library treats '\r\n' and '\n' as the same, so headers separated by either will be
// parsed.
//
// [RFC822 Section 3]: https://tools.ietf.org/html/rfc822#section-3
//
// @module header-parse