Skip to content

Instantly share code, notes, and snippets.

@john-doherty
john-doherty / javascript-trim-svg-whitespace.js
Created October 21, 2016 13:39
Trim whitespace from SVG elements
function trimSvgWhitespace() {
// get all SVG objects in the DOM
var svgs = document.getElementsByTagName("svg");
// go through each one and add a viewbox that ensures all children are visible
for (var i=0, l=svgs.length; i<l; i++) {
var svg = svgs[i],
box = svg.getBBox(), // <- get the visual boundary required to view all children
@notnotrobby
notnotrobby / cgp.md
Last active November 30, 2024 00:49
List of free resources to study computer graphics programming.
@ruvnet
ruvnet / React-flow-Python.md
Last active November 30, 2024 00:41
This tutorial demonstrates how to create a basic Python Flask implementation with React Flow.

Building Complex Drag & Drop Visual AI Workflows with React Flow and Python Flask

Created by @rUv

React Flow Showcase Image

This tutorial demonstrates how to create a Python Flask implementation with React Flow to build complex AI workflows, reasoning systems, and comprehension modeling tools.

React Flow is a powerful open-source library for building interactive node-based interfaces in React applications. Its flexibility and extensibility make it an excellent choice for creating sophisticated AI applications.

@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active November 30, 2024 00:40
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@nicolasdao
nicolasdao / open_source_licenses.md
Last active November 30, 2024 00:38
What you need to know to choose an open source license.
@wikiti
wikiti / !FAB-CLAIM-README.md
Last active November 30, 2024 00:38
A script to automatically add all Quixel MegaScans items to your FAB account

Important

This script was built for educational purposes. Due to how FAB APIs are built to handle search pagination, all assets might not be claimable through this script. With the last script update, a total of ~600 scanned pages, with ~14k assets. Please note that, by clicking on the "Claim All" quixel button, you'll already have claimed all assets for future free usage, beyond 2024 (official response). This script simply makes sure that assets are added to a library.

Script to add all quixel megascan items to your FAB account

As quixel megascan items will stop being free after 2024. So, this script will go through all Quixel MegaScan items and add them to your account. Quixel would be working on a tool to automatically add all resources to your FAB account, but I couldn't help myself and I wrote a script to do it.

How to use

@chrisrink10
chrisrink10 / config_vlans
Created August 22, 2023 23:51
3 VLAN Configuration for ASUS RT-AX88U with Merlin
#!/bin/sh
# Create VLANs to match the configuration on the FreshTomato router cj-router-3200
#
# Adapted from the following sources:
# - https://virtualize.link/asus-vlans/
# - https://gist.github.com/Jimmy-Z/6120988090b9696c420385e7e42c64c4
# - https://www.snbforums.com/threads/vlans-trunk-interface-tagged-and-untagged-traffic-rt-ax86u-and-rt-ax88u.78411/#post-846773
# - https://www.snbforums.com/threads/rt-86u-vlanctl-ethctl-usage-puzzle.54375/

Arch Install for Macbook Pro

Macbook Pro Retina 15-inch, Late 2013
Model Identifier: MacBookPro11,2

The MacBook Pro 11,x consists of models with Retina display shipped by Apple In Late 2013 and Mid 2014.
Following ArchWiki guide.

Steps for OS installation

Grab a cup of coffe and get ready, because life is not always easy 🙈

Assets

@henri
henri / 01_wezterm_cheatsheet.txt
Last active November 30, 2024 00:43
wezterm cheat sheet
# pane splitting cli
https://wezfurlong.org/wezterm/cli/cli/split-pane.html
# default pane movement basic (arrow keys)
shift-control-leftarrow
shift-control-rightarrow
shift-control-uparrow
shift-control-downarrow
# get some help with the command line
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active November 30, 2024 00:19
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.