@ochafik's gists
Last updated: 2025-12-01 00:35 UTC | Total: 273 gists | (61 public, 212 private)
@ochafik's gists
Last updated: 2025-12-01 00:35 UTC | Total: 273 gists | (61 public, 212 private)
So yeah, the last stable build of OpenSCAD is over 4 years old as of this writing.
Nightly (Dev) builds of OpenSCAD have seen 100x speed improvements since that release, when enabling the Manifold backend (see this presentation).
If you can install a Dev build instead of the stable version, you should! (then, pass --backend=manifold if using in Command line, or switch the renderer from slow CGAL to Manifold in the UI settings if using the UI; see instructions here).
If you can't install the Dev build, well, you kinda can (for command-line use only, and if you have Docker): put the openscad script below in your PATH, and you're good to go (make sure it's executable w/ chmod +x path/to/openscad).
Oh, and on MacOS some projects that use OpenSCAD assume its binary is in /Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD
| #!/usr/bin/env node | |
| /* | |
| Gets the file under $OLLAMA_HOME/models/blobs/ for the application/vnd.ollama.image.model key in the manifest | |
| - Note that metadata of modelId:modelTag is stored under $OLLAMA_HOME/models/manifests/registry.ollama.ai/library/${modelId}/${modelTag} | |
| - You'll need to get the Jinja template from the original model using llama.cpp's scripts/get_chat_template.py script | |
| ollama pull qwen2.5-coder:7b | |
| llama-server -m $( ./get_ollama_gguf.js qwen2.5-coder:7b ) -fa --jinja --chat-template-file <( ./scripts/get_chat_template.py Qwen/Qwen2.5-Coder-7B-Instruct-GGUF tool_use ) | |
| Initially shared here: https://github.com/ggml-org/llama.cpp/pull/9639#issuecomment-2704208342 |
fast-csg is still a work in progress.
For large models it works best with CGAL/cgal#5461 in CGAL and used in OpenSCAD by openscad/openscad#4107.
If you want a sneak peek of the new world, enable fast-csg-remesh in the following build:
( git clone https://github.com/sloriot/cgal \
-b PMP-decimation --depth=1 \
cgal-sloriot-PMP-decimation && \Only happens in mingw32 64bit builds (whether building in Windows on a msys2 env, or cross-building from linux w/ the MXE environment).
docker run -it openscad/mxe-x86_64-gui:latest
apt install -y vim cmake
# Then paste the script above
| #!/bin/bash | |
| # | |
| # Beautifies output of `wg show` using config names from pivpn | |
| # | |
| wg show | awk "BEGIN { $( | |
| # Map peer to preshared key | |
| wg show all preshared-keys | awk '{ print "key[\"" $2 "\"] = \"" $3 "\";" }' | |
| for f in $( ( . /etc/pivpn/wireguard/setupVars.conf ; echo $install_home ) )/configs/* ; do | |
| # Map preshared key to config name |
This script runs certbot in manual mode with a custom adhoc local DNS server (written in node.js using my fork of joyent/node-mname) to respond to its challenge.
The Let's Encrypt non-profit does an amazing job at helping hosting providers provide SSL certificates for free to their customers. This should be your first choice to get one, but maybe your provider prefers charging you for said certificates. That's where we come to play.
If you've just bought a domain and have a Unix machine connected to the internet (laptop, VPS or dedicated instance), you'll get your SSL certificate in 10 minutes chrono. Let's start!
| // Copyright 2021 Google LLC. | |
| // SPDX-License-Identifier: Apache-2.0 | |
| // | |
| /* | |
| https://github.com/openscad/openscad/pull/3641 | |
| g++ \ | |
| -stdlib=libc++ -std=c++1y \ | |
| -I../CGAL-5.2/include \ | |
| -lgmp -lmpfr \ |
| // Copyright 2021 Google LLC. | |
| // SPDX-License-Identifier: Apache-2.0 | |
| // | |
| #include <CGAL/Polygon_mesh_processing/repair_polygon_soup.h> | |
| #include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h> | |
| template <typename K> | |
| std::shared_ptr<CGAL::Polyhedron_3<K>> repairPolyhedron(const CGAL::Polyhedron_3<K> &poly) | |
| { |