Skip to content

Instantly share code, notes, and snippets.

Matthew metaquanta

View GitHub Profile
# -- Jost --
# `('${$$('table a.js-navigation-open').map(a => a.href).join("' \\\n'")}')`
PATHS=('' \
'' \
'' \
View embed_wikipedia_midis.js
// ==UserScript==
// @name Wikipedia: embed midi
// @namespace mqScripts
// @match *://**
// @grant none
// @require
// ==/UserScript==
// Requires that your browser knows what to do with midi audio tags.
// eg MIDI Player
View install node
# Sketchy (TODO, uwrap this)
sudo curl -sL | sudo bash -
sudo apt update
sudo apt install nodejs
View 00212308.html
<table cellpadding="0" cellspacing="0" border="0" id="x:1533160306.2:mkr:contentTbl" style="table-layout:fixed;width:100%;" mkr="contentTbl"><tbody id="x:1533160306.3:mkr:headingArea" mkr="headingArea"><tr id="x:1533160306.9:mkr:header" class="ig_ElectricBlueHeader igg_ElectricBlueHeader" mkr="header"><td><div style="overflow:hidden;"><table id="x:1533160306.10:mkr:headerContent.hdn" cellpadding="0" border="0" style="table-layout: fixed; visibility: inherit; margin-left: 0px; width: 1020px;" cellspacing="0" mkr="headerContent.hdn"><tbody><tr id="x:1533160306.11:mkr:columnHeaderRow" mkr="columnHeaderRow"><th id="x:1533160306.12:adr:0:idx:0:key:RowNumber:hdr:1:skp:" class="igg_ElectricBlueHeaderCaption" style="width: 40px;" title="" skp="" hdr="1" key="RowNumber" idx="0" adr="0">#</th><th id="x:1533160306.12:adr:1:idx:1:key:ImageUrl:hdr:1:skp:" class="igg_ElectricBlueHeaderCaption smallCell igede12b8d" style="width: 0px;" title="" skp="" hdr="1" key="ImageUrl" idx="1" adr="1">Image</th><th id="x:1533160306.12:a
View openwrt_rescue.ttl
# Good stuff here:
# (p3,5,7,9 on JTAG are GPIOs?)
J1: 1,2,3 (not 4) -> raspi: 10,8,6
minicom -D /dev/ttyAMA0 -b 115200
type: 'tpl<enter>' when uboot is preparing to load
# server should be
# see that with printenv
metaquanta /
Last active Nov 16, 2017
List packages that don't belong in your distro.
PACKAGE_LIST="dpkg-query -W -f='${binary:Package}\n'" # List all debs
#PACKAGE_LIST=apt-mark showmanual # List only requested/manually installed debs
# Unknown origin debs get 100.
# I have some preferences to set some repos to other priorities in (100-200)
xargs apt-cache policy | \
grep -B 4 " \*\*\*.*${PRIORITY}$" | \
metaquanta / Cura end.gcode
Created Sep 29, 2017
MP Select Mini Slicer Settings
View Cura end.gcode
M104 S0 ;extruder heater off
G91 ;relative positioning
G1 E-1 F300 ;retract the filament ... to release some of the pressure.
G1 Z+5 E-1 F{travel_speed} ;move Z up a bit and retract filament /just/ a little more.
G90 ;absolute positioning
G0 X0 Y110 ; Present the result!
M84 ;steppers off
M106 S0 ; Fan off.
metaquanta / Pi ⟷ Mini UART
Last active Sep 30, 2017
MP Select Mini USART Interface
View Pi ⟷ Mini UART

MP Select Mini

The serial cable (that ordinarily connects to the LCD controller) has four wires: Red, White, Green, Black.

  • Red ➙ Ground
  • White ➙ TX USART1 - pin 42
  • Green ➙ RX USART1 - pin 43
  • Black ➙ +3.3V (yup, they're backwards)

†: on the STM32 processor

metaquanta /
Last active Sep 27, 2017
Setup Chromoting/CRD/Chrome Remote Desktop from the command line.
# This assumes the package is installed.
# wget
# sudo apt install ./chrome-remote-desktop_current_amd64.deb
# # And maybe
# wget
# sudo apt install ./google-chrome-stable_current_amd64.deb
# # Fix the likely missing dependencies.
# sudo apt --fix-broken install
metaquanta / bdf2json.js
Last active Jul 9, 2017
A script that turns a BDF bitmap font into a dictionary of bitmaps
View bdf2json.js
#!/usr/bin/env node
const regrep = require('stream-replace');
/* Stream in, stream out.
The output will look something like this:
{ "${code_0}": ["${hex^0_0}", ..., "${hex^0_n}"],
"${code_1}": [...],
You can’t perform that action at this time.