Skip to content

Instantly share code, notes, and snippets.

View aziraphale's full-sized avatar

Andrew Gillard aziraphale

View GitHub Profile
@aziraphale
aziraphale / config.txt
Created November 2, 2017 10:09
Smoothieboard BL Touch Configuration (with Z-Max Endstop)
gamma_min_endstop nc # Normally 1.28. Change to nc to prevent conflict,
## Z-Probe (BL Touch)
# See http://forum.smoothieware.org/forum/t-1760423/bltouch-support#post-2712545
# And http://smoothieware.org/zprobe#bltouch-or-servo-retractable-touch-probe
zprobe.enable true # set to true to enable a zprobe
zprobe.probe_pin 1.28 # pin probe is attached to if NC remove the !
zprobe.slow_feedrate 5 # mm/sec probe feed rate
zprobe.fast_feedrate 100 # move feedrate mm/sec
zprobe.probe_height 5 # how much above bed to start probe
@aziraphale
aziraphale / AAISP-RouterOS-Bonding.rsc
Created January 27, 2018 15:15
AAISP line bonding config for a Mikrotik RouterOS router
# Note: this can't be used directly, but is a good starting point.
# Based on a Mikrotik RouterBoard RB450G.
# In my setup, one VDSL modem is connected directly to ether2, while the other goes via my core network switch on ether3.
# Ports ether3, ether4 and ether5 are bridged into an interface named "LAN", which is where all local traffic would
# come from.
# This config includes an odd third route rule which I can't explain, but I found that throughput broke when it was removed.
# This is based on bonding two lines. More can be bonded by adding more PPPoE-Client interfaces, more firewall/mangle rules,
# more routes, and by changing the "nth" parameter of the mangle rules.
# Note that this config only defines UPSTREAM traffic bonding; downstream bonding is configured by adjusting the number
# of lines selected for each IP address block in http://control.aa.net.uk/.
@aziraphale
aziraphale / outlook-set-font-consolas.ahk
Last active September 12, 2018 10:51
Set Outlook 2016 message compose font to Consolas using Ctrl+Shift+M (AutoHotkey script)
;;;;; OUTLOOK 2016 MAIN OR COMPOSE WINDOW REDEFINE
;;;;; Redefine only when the active window is an Outlook (2016) window
#IfWinActive ahk_class rctrl_renwnd32
; Set font to Consolas with Ctrl+Shift+M
^+m::
; Outlook is a bit slow to respond!
SetKeyDelay, 100
Send !h
Send f
Send f
@aziraphale
aziraphale / arrow.com-250vac-capacitor-filter-selection.js
Created October 4, 2018 21:11
JavaScript to select all ≥250VAC (or ≥400VDC) capacitors on Arrow's website
/**
* Arrow's website is currently (2018-10) pretty bad at filtering for ranges of
* values in a component property. In this case I wanted to select every
* capacitor with a voltage rating of at least 250V AC (or 400V DC). Arrow
* lets you search for a specific value, but that would only let me easily
* select, say, 250VAC capacitors, ignoring all of the 300VAC or 400VAC
* capacitors, which would be equally suitable for my purposes.
* This script uses some very simple regular expressions to compare the values
* in the <select name="Voltage"> box against an `AC_MIN` variable and a
* `DC_MIN` variable, selecting that value if it's greater than either of
@aziraphale
aziraphale / dmesg.log
Created February 24, 2019 00:19
AGPTEK USB 3.0 HDMI Capture Box (VG0061) hardware information
New USB device found, idVendor=1bcf, idProduct=2c99
New USB device strings: Mfr=1, Product=2, SerialNumber=0
Product: FHD Capture
Manufacturer: VXIS Inc
@aziraphale
aziraphale / ublock-origin-filter.txt
Created February 1, 2020 01:50
uBlock Origin: Hide YouTube's "Breaking news" section
! [Add this to the "My filters" section of uBlock Origin's settings]
! ### Remove YouTube's gorram "Breaking news" section ###
! ### I go to YouTube to AVOID daily bullshit, not to have it shoved in my face!! ###
! This removes page-width blocks - `<ytd-rich-section-renderer>` tags - which have a descendent somewhere with ID "title" and the text "Breaking news".
! The match on "Breaking news" uses a regular expression primarily so that it can be made case-insensitive.
! The `#title` tag we're matching looked like this, at least for me on 2020-02-01:
! <span id="title" class="style-scope ytd-rich-shelf-renderer">Breaking news</span>
! The other two `:has()` rules are just a bit of extra filtering that I hope might improve performance and/or reduce the chance of this rule matching where it's not wanted.
! YouTube is likely to change things and break this rule before too long, in which case removing `:has(:scope #dismissable)` and `:has(:scope #featured-badge)` may help.
! Note that `:scope` limits matches to