Skip to content

Instantly share code, notes, and snippets.

@darkxst
darkxst / rules.txt
Last active November 3, 2025 13:03 — forked from denniskupec/rules.txt
KiCad DRC rules for JLCPCB, 2 & 4-layer PCB
(version 1)
#Kicad 7
# 2-layer, 1oz copper
(rule "Minimum Trace Width (outer layer)"
(constraint track_width (min 5mil))
(layer outer)
(condition "A.Type == 'track'"))
(rule "Minimum Trace Spacing (outer layer)"
# somewhat hackish solution to:
# https://twitter.com/EamonCaddigan/status/646759751242620928
# based mostly on copy/pasting from ggplot2 geom_violin source:
# https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r
library(ggplot2)
library(dplyr)
"%||%" <- function(a, b) {

Git Cheat Sheet

Commands

Getting Started

git init

or

@rdb
rdb / js_linux.py
Last active May 30, 2025 08:09
Access joysticks/game controllers from Python in Linux via the joystick driver. See https://discourse.panda3d.org/t/game-controllers-on-linux-without-pygame/14128
# Released by rdb under the Unlicense (unlicense.org)
# Based on information from:
# https://www.kernel.org/doc/Documentation/input/joystick-api.txt
import os, struct, array
from fcntl import ioctl
# Iterate over the joystick devices.
print('Available devices:')
@gsee
gsee / server.R
Last active January 6, 2020 13:09
simple streaming shiny plot
set.seed(42)
dat <- rnorm(1)
shinyServer(function(input, output) {
fetchData <- reactive(function() {
invalidateLater(1000)
qt <- rnorm(1)
dat <<- c(dat, qt)
dat
})
output$plot_dat <- reactivePlot(function() { plot(fetchData(), type='l') })
@pklaus
pklaus / README.md
Last active July 14, 2017 17:15
This module has now evolved into a proper Python package, that you can install with pip: https://github.com/pklaus/serialman