Skip to content

Instantly share code, notes, and snippets.

View numanair's full-sized avatar

numanair

  • Washington
View GitHub Profile
@HNJAMeindersma
HNJAMeindersma / changedetection_price_notifications.md
Last active June 26, 2024 05:13
Pretty Gotify notifications from ChangeDetection.io's Price-mode

This is a very, very dirty way of turning ChangeDetection.io's price-mode output, which is JSON, into a more friendly markdown format. Using Jinja2, which is currently lacking a from_json function, we replace parts of the JSON output to form a markdown message. This will only work correctly as long as ChangeDetection.io's price-mode override JSON format stays EXACTLY the same. Any non HTTP 200 response might trigger such a change in which case a malformed message might be produced and send. Not something that could (should) "break" your ChangeDetection.io or notification service. Which is Gotify in this example gist. Tested with Tweakers.net Pricewatch product pages.

Example output

Some Product has changed!

  • Lowest: 235.67 → 235.65
  • Highest: 482.57
  • Sellers: 33
  • Currency: EUR

https://tracking-and-comparing-web.site/some-product.html

@gtirloni
gtirloni / wsl-luks.md
Created May 2, 2022 12:44
Windows WSL2 and LUKS

If you have a LUKS-encrypted partition on another disk, it's easy to mount it inside WSL.

List your disks:

> wmic diskdrive list brief

Mount the whole disk inside WSL (using --bare so WSL doesn't attempt to mount it automatically):

@JeremyKennedy
JeremyKennedy / pa_cal.cfg
Last active June 20, 2024 23:48
Klipper Pressure Advance Line Calibration Macro
[gcode_macro PA_CAL]
# Klipper pressure advance line calibration macro.
# Usage: PA_CAL BED=100 NOZZLE=240 PA_START=0.0 PA_STOP=0.1 NZL=0.4
# Or you can execute with no parameters, which will use values from printer.cfg and saved_variables.cfg.
# First prints a line with current set PA, then prints 21 additional line segments starting with PA_START, and increasing to PA_STOP.
# Based on http://realdeuce.github.io/Voron/PA/pressure_advance.html
# Cleaned up and moved to using saved_variables.cfg by u/jibbsisme
# Sourced from u/Deepsiks, assisted by u/imoftendisgruntled, u/scul86, and thanks to u/beansisfat, u/stray_r
description: Tune Pressure Advance
@tothi
tothi / upgrade_LineageOS_with_Magisk.md
Last active July 12, 2024 07:53
Upgrading LineageOS and reinstalling Magisk

Upgrade LineageOS with Magisk

WARNING: tested only on my setup (LineageOS 18.1 on instantnoodle), other setups may break and brick the device!

Step-by-step instructions (for reinstalling patched boot.img for Magisk):

  1. upgrade LineageOS to the latest by the standard way in Android GUI (download + install + reboot)
  2. if using not the latest Magisk: wipe old (possibly hidden) Magisk app then install the up-to-date one from the official Magisk github repo
  3. install (git clone) payload_dumper from GitHub (in Termux or in an SSH session on the Android device) for the 1st time, or update (git pull) later
  4. the Android terminal session: wget the same LineageOS nightly image installed in step 1 from https://download.lineageos.org/
@ChipCE
ChipCE / readme.md
Last active June 3, 2024 13:44
Klipper bed mesh on print area only macro install guide

READ THIS FIRST

Adaptive bed mesh is merged into klipper master branch. You can use this feature without this custom macro. Official klipper adaptive bed mesh

Klipper mesh on print area only install guide

What this macro do

  • This macro will dynamically changing the bed mesh area based on the size of the parts will be printed. The fw will only probe on the area that the part will be printed (plus mesh_area_offset value)
@NameOfTheDragon
NameOfTheDragon / Voron 2.4 Config 0.4mm nozzle.ini
Created August 12, 2021 13:42
High quality print profile for Voron 2.4 based on a PIF profile
# generated by SuperSlicer 2.3.56 on 2021-08-12 at 13:39:50 UTC
allow_empty_layers = 0
avoid_crossing_not_first_layer = 1
avoid_crossing_perimeters = 0
avoid_crossing_perimeters_max_detour = 0
bed_custom_model =
bed_custom_texture =
bed_shape = 0x0,350x0,350x350,0x350
bed_temperature = 50,90,90,90,90
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\n\n
@JamesHagerman
JamesHagerman / Black-Magic-Probe-flash-notes.md
Last active December 7, 2023 18:12
The BPM is basically the best flashing tool for STM32/ARM chips. Get the hex file for whatever you're flashing (build it, download it, whatever), then follow these directions.

Black Magic Probe - Firmware Flashing

The BPM is basically the best flashing tool for STM32/ARM chips. Get the hex file for whatever you're flashing (build it, download it, whatever), then follow these directions.

Install compiler

First install the arm compiler:

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
@fasiha
fasiha / youtube-dl-crunchyroll.md
Last active April 15, 2024 14:51
Youtube-dl with Crunchyroll

Get the following:

  • a Crunchyroll account (though they let you watch/download some videos without an account, at 480p),
  • the latest youtube-dl (brew upgrade youtube-dl),
  • your browser’s user agent,
  • your Crunchyroll cookies (cookie.txt export for Chrome is handy) into a cookies.txt file.

Then,

@envil
envil / HorizontalScrolling.ahk
Created November 10, 2016 03:03
AutoHotKey - Fine Horizontal Scrolling for Windows
; Shift + Wheel for horizontal scrolling
+WheelUp::
; Scroll to the left
MouseGetPos,,,id, fcontrol,1
Loop 8 ; <-- Increase for faster scrolling
SendMessage, 0x114, 0, 0, %fcontrol%, ahk_id %id% ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINERIGHT.
return
+WheelDown::
;Scroll to the right
MouseGetPos,,,id, fcontrol,1
@TKIPisalegacycipher
TKIPisalegacycipher / DeleteGmusicDupes-Python35.py
Last active June 12, 2020 16:22 — forked from sckzw/README.md
Python script to find and delete duplicate tracks from Google Play Music library.
#!/usr/bin/env python
# created by shuichinet https://gist.github.com/shuichinet
# forked from https://gist.github.com/shuichinet/8159878 21 Nov 2015
# using minor edits by fcrimins https://www.reddit.com/user/fcrimins from https://www.reddit.com/r/google/comments/2xzgyv/remove_duplicate_songs_from_google_play_music/csh6mrh
# also using clever edits by Morgan Gothard https://medium.com/@mgothard
# updated for Python 3.5 by John M. Kuchta https://medium.com/@sebvance 22 Nov 2016 (hey I was busy)
# compiled by John M. Kuchta https://medium.com/@sebvance
# thanks to shuichinet, fcrimins and Mr. Gothard for their work