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 / 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 / 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 / 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 / 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
#!/usr/bin/env python
from weasyprint import CSS, HTML
html = '''
<html>
<head><title>test</title></head>
<body>
<h1>This is a test.</h1>
<p>This is only a test.</p>
@whitelynx
whitelynx / .config_i3_config
Created September 25, 2016 10:39
i3 config
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $mixer_control Master
# Bar on top:
set $bar_pos top