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
A::B is a system with 4 tokens: `A#`, `#A`, `B#` and `#B`.
An A::B program is a sequence of tokens. Example:
B# A# #B #A B#
To *compute* a program, we must rewrite neighbor tokens, using the rules:
A# #A ... becomes ... nothing
A# #B ... becomes ... #B A#
@OrionReed
OrionReed / dom3d.js
Last active September 19, 2024 20:10
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@Andrej730
Andrej730 / notes_solvespace_example_py.md
Last active July 24, 2024 12:20
Solvespace Python example and notes
@matthewfeickert
matthewfeickert / README.md
Last active April 12, 2023 12:38
Debug for VS Code crashing when opening Python files for https://gitlab.cern.ch/gstark/pycolumnarprototype

Unexpected crashing of VS Code when opening Python files

Today (2023-04-03) VS Code is crashing whenever a Python file is opened in the mixed language repository https://gitlab.cern.ch/gstark/pycolumnarprototype

This behavior has not been observed until today. The machine uptime has been minimal.

$ uptime
 17:57:25 up 14:11,  1 user,  load average: 2.04, 2.15, 2.04
@soof-golan
soof-golan / Dockerfile
Last active September 17, 2024 14:28
Python + Poetry + Docker Example
FROM python:3.10 as python-base
# https://python-poetry.org/docs#ci-recommendations
ENV POETRY_VERSION=1.2.0
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
# Tell Poetry where to place its cache and virtual environment
ENV POETRY_CACHE_DIR=/opt/.cache
@llandsmeer
llandsmeer / documentation.md
Last active March 7, 2023 12:48
libfive studio examples in python
  • Shape(ptr)
  • array_polar(shape, n, center=(0, 0))

    Iterates a shape about an optional center position

  • array_polar_z(shape, n, center=(0, 0))

    Iterates a shape about an optional center position

  • array_x(shape, nx, dx)

    Iterates a part in a 1D array

  • array_xy(shape, nx, ny, delta)

    Iterates a part in a 2D array

  • array_xyz(shape, nx, ny, nz, delta)
@insertish
insertish / React Native.md
Last active September 19, 2024 01:21
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.
@Akxe
Akxe / PortAwareSharedWorker.ts
Last active September 13, 2024 00:01
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 July 8, 2024 16:10
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"