Skip to content

Instantly share code, notes, and snippets.

View inactivist's full-sized avatar
💭
fixing things

Michael Curry inactivist

💭
fixing things
View GitHub Profile
@insertish
insertish / React Native.md
Last active August 19, 2025 05:17
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.
@Akxe
Akxe / PortAwareSharedWorker.ts
Last active September 17, 2025 16:29
PortAwareSharedWorker, shared worker that know who is still connected and who is not
/// <reference lib="webworker" />
type SharedWorkerPort = MessagePort | DedicatedWorkerGlobalScope;
class PortAwareSharedWorkerPort<T extends SharedWorkerPort = SharedWorkerPort, D = any> {
private readonly weakRef: WeakRef<T>;
private disconnected = false;
constructor(
port: T,
onMessage: (eventData: D) => void,
# Create this file in /etc/udev/rules.d/51-android.rules (root owned, bitmask 0644)
# Reload udev (udevadm control --reload-rules)
#
# It will allow members of the `adbusers` group to access the phone over usb without being root
# You should create a new unprivileged user who is a member of this group, then run `adb` as said user
#
# To add a new device, plug in the device and run `lsusb` to determine its device id then add it in, eg:
# $ lsusb
# Bus 002 Device 063: ID 18d1:4ee7 Google Inc. Nexus/Pixel Device (charging + debug)
@atomgomba
atomgomba / Polymaker PolyFlex 95A.ini
Last active December 29, 2024 14:19
Filament settings for Polymaker PolyFlex 95A (Prusa Slic3r)
# generated by PrusaSlicer 2.3.0+linux-x64 on 2021-01-29 at 10:18:59 UTC
bed_temperature = 50
bridge_fan_speed = 100
compatible_printers =
compatible_printers_condition = nozzle_diameter[0]>0.35 and printer_model!="MK2SMM" and printer_model!="MINI" and num_extruders==1 && ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material)
compatible_prints =
compatible_prints_condition =
cooling = 1
disable_fan_first_layers = 5
end_filament_gcode = "; Filament-specific end gcode"
@VioletGiraffe
VioletGiraffe / install.sh
Last active March 10, 2024 17:23 — forked from adduc/install.sh
My installation of tortoisehg on Ubuntu 20.04 and newer
#!/bin/bash
TARGET_DIR=~/Downloads/repos/third-parties
TORTOISEHG_VERSION=${5:-stable}
prepare() {
sudo apt-get -y update
sudo apt-get -y install \
curl \
@pschatzmann
pschatzmann / Springs.ipynb
Last active February 1, 2026 10:11
3D Printed Springs in OpenSCAD
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
interface ChooseFileSystemEntriesOptionsAccepts {
description?: string;
mimeTypes?: string[];
extensions?: string[];
}
interface ChooseFileSystemEntriesOptions {
type?: 'openFile' | 'saveFile' | 'openDirectory';
multiple?: boolean;
accepts?: ChooseFileSystemEntriesOptionsAccepts[];
@adduc
adduc / install.sh
Last active August 24, 2021 09:23
My installation of mercurial, tortoisehg, and hg-git on Ubuntu 20.04 and newer
#!/bin/bash
TARGET_DIR=/opt/repos/third-parties
HG_GIT_VERSION=${1:-default}
HG_RELEASE_VERSION=${2:-5.5.2}
HG_REPO_VERSION=${3:-stable}
TORTOISEHG_VERSION=${4:-stable}
update() {
# Update packages
import subprocess
# grab subnet address
ps = subprocess.Popen('ifconfig', stdout=subprocess.PIPE, shell=True)
output = subprocess.check_output(('grep', 'inet'), stdin=ps.stdout)
ps.wait()
elements = output.decode('utf8').split()
broadcast_ip = elements[elements.index('broadcast') + 1]
print('broadcast_ip: {}'.format(broadcast_ip))
subnet = broadcast_ip[:-4]
@rengler33
rengler33 / scrape_with_logs.py
Last active February 8, 2025 04:09
How to Capture Network Traffic When Scraping with Selenium & Python
# see rkengler.com for related blog post
# https://www.rkengler.com/how-to-capture-network-traffic-when-scraping-with-selenium-and-python/
import json
import pprint
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
capabilities = DesiredCapabilities.CHROME