This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
height = 40; width = 80; depth = 80; | |
thickness = 2.7; cornerRadius = 10; tabLength = 10; | |
slotRepeatMin=2; slotLengthMin=20; slotLengthGap = 2; slotWidth = 0.2; | |
PI = 3.142*1.02; //Add a fudge factor for the bend radius | |
function hingeLength(angle, radius) = 2*PI*radius*(angle/360); | |
//Use true to generate 3D models of the box parts | |
//Use false to generate 2D models which can be exported |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> | |
<_name>Living Hinge</_name> | |
<id>org.lvl1.living_hinge</id> | |
<dependency type="executable" location="extensions">living_hinge.py</dependency> | |
<param name="unit" _gui-text="Unit" type="enum"> | |
<_item value="mm">mm</_item> | |
<_item value="cm">cm</_item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -i python3 -p "python3.withPackages (p: [ p.numpy ])" | |
import json | |
import sys | |
import numpy as np | |
import collections | |
import binascii | |
data = json.load(open(sys.argv[1])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const s = document.querySelector('svg'); | |
const [c1, c2] = [...s.querySelectorAll('circle')]; | |
const mat = new DOMMatrix(); | |
let origScene = null, lastWorld = null; | |
s.addEventListener('mousedown', (evt) => { | |
lastWorld = { x: evt.offsetX || (evt.pageX - s.offsetLeft), y: evt.offsetY || (evt.pageY - s.offsetTop) }; | |
origScene = new DOMPoint(lastWorld.x, lastWorld.y).matrixTransform(mat.inverse()); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchFromGitHub, meson, pkg-config, cmake, ninja, python3, gobject-introspection, gtkmm4, libepoxy, eigen, opencascade-occt, mimalloc, glm, libuuid, range-v3, librsvg }: | |
stdenv.mkDerivation { | |
pname = "dune3d"; | |
version = "9af108e"; | |
src = fetchFromGitHub { | |
owner = "dune3d"; | |
repo = "dune3d"; | |
rev = "9af108e591b3cdadf71f23e366f72dc8af8359bf"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From bbd014bf407b2ec97fa18cca89d46d1867f62c83 Mon Sep 17 00:00:00 2001 | |
From: Alexandre Macabies <web+oss@zopieux.com> | |
Date: Thu, 21 Sep 2023 22:53:31 +0200 | |
Subject: [PATCH] Audio export conversion hack for training aids. | |
--- | |
default.nix | 174 +++++++++++++ | |
flake.lock | 61 +++++ | |
flake.nix | 27 ++ | |
src/app/app.cpp | 2 + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -p clipnotify -p xclip -p mpv -p streamlink -i python3 | |
""" | |
Takes multiple URIs (including URLs, local files should work as well), | |
resolves them through streamlink to get the stream link when applicable, | |
then plays them all in a nicely packed tiled layout. | |
If no URI is provided as argument, starts an interactive selection where | |
Xorg-clipboard copied URLs get accumulated until the program is ^C. | |
Layouts: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const trs = [...document.querySelectorAll('#container>table>tbody>tr')] | |
const beg = trs.splice(0, 2) | |
trs.filter((x,i) => i%2==0).forEach(tr => { | |
tr.querySelectorAll(':scope > td').forEach(td => beg[0].insertAdjacentElement('beforeend', td)) | |
}) | |
document.querySelectorAll('#container>table>tbody>tr>td').forEach(e => e.style.width=100/16) | |
document.querySelector('body').style.fontFamily = 'monospace' | |
document.querySelector('#body').style.maxWidth = null | |
document.querySelector('#body').style.width = '100%' | |
document.querySelector('#game').style.width = '100%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/sui77/rc-switch | |
#include <RCSwitch.h> | |
#define CONFIG_BUFSIZE ((8 + 16 + 8) / 8) | |
typedef union { | |
struct { | |
uint8_t transmitPin; | |
uint16_t pulseLength; | |
uint8_t repeatTx; | |
} c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am zopieux on github. | |
* I am zopieux (https://keybase.io/zopieux) on keybase. | |
* I have a public key ASCq3dB3j_rLJ_JoF2t2F5Km_8nVHoa-v_nNsWh0aDEBUgo | |
To claim this, I am signing this object: |
NewerOlder