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
@0wwafa
0wwafa / print_grok.md
Created February 26, 2025 02:24
PRINT / EXPORT Grok to PDF

To print a GROK chat, paste this code in javascript console:

(function() {
    var a = document.querySelector("body > div > div").children[0].children[1].children[0];
    if (a) {
        const b = window.open("", "_blank", `width=${.85 * window.screen.width},height=${.85 * window.screen.height},left=${.075 * window.screen.width},top=${.045 * window.screen.height}`)
          , e = Array.from(document.styleSheets).map(c => {
            try {
                return Array.from(c.cssRules).map(d => d.cssText).join("\n")
            } catch (d) {
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 May 15, 2025 11:15
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; // ¯\\_(ツ)_/¯
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@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
@1oh1
1oh1 / optiplex-3060-enable-pcie3.md
Last active May 14, 2025 09:16
Dell OptiPlex 3060 - Enable NVMe Gen 3 speeds (Enable PCIe 3.0)

Enable PCIe 3.0 speeds for NVMe SSDs on Dell OptiPlex 3060

Out of the box, any M.2 NVMe SSDs connected to the Dell OptiPlex 3060 runs at PCIe Gen 2.0 speeds (Max 5 GT/s; 2 GB/s) so the speed tests look like this:

screen1

However, after this BIOS mod, the SSD can reach PCIe Gen 3.0 speeds (Max 8 GT/s; 3.9 GB/s) so the speed tests look like this:

screen2

@soof-golan
soof-golan / Dockerfile
Last active March 29, 2025 06:05
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 15, 2025 02:14
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.