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#
@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 May 10, 2024 18:24
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 April 18, 2024 21:28
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.
@Akxe
Akxe / PortAwareSharedWorker.ts
Last active January 10, 2024 16:19
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)
@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 March 6, 2023 14:09
3D Printed Springs in OpenSCAD
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[];