Skip to content

Instantly share code, notes, and snippets.

@ErkHal
ErkHal / Thingiverse speed downloader.user.js
Last active April 21, 2024 12:16
UPDATED 18.10.2023: TamperMonkey script that allows you to download Thingiverse files without the pop-up and 5 second wait time.
// ==UserScript==
// @name Thingiverse speed downloader
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Just straight up download the .zip and not having to wait for 5 secs or be stopped by anti-adblock. Thanks to Deses, scoutman57, kohrar and quantumfrost for updates !
// @author ErkHal
// @include https://www.thingiverse.com/thing:*
// @exclude https://www.thingiverse.com/thing:*/edit*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
@kissgyorgy
kissgyorgy / listen.py
Created September 4, 2020 16:37
How to use PostgreSQL's LISTEN/NOTIFY as a simple message queue with psycopg2 and asyncio
import asyncio
import psycopg2
# dbname should be the same for the notifying process
conn = psycopg2.connect(host="localhost", dbname="example", user="example", password="example")
conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
cursor = conn.cursor()
cursor.execute(f"LISTEN match_updates;")
@theely
theely / GPSLog.lua
Last active February 14, 2021 13:20
Rolling GPS latlong logging. Stores the latest 100 distinct latlong coordinates (redundant coordinates are ignored). Coordinates are stored in: /LOGS/GPS_rolling_positions.log. Logging is paused if less than 4 satellites are available.
-- License https://www.gnu.org/licenses/gpl-3.0.en.html
-- OpenTX Lua script
-- FUNCTION
-- Place this file in SD Card > /SCRIPTS/FUNCTIONS/
-- Author: Elia P.
-- Date: 2019 November 02
-- Description