jq is useful to slice, filter, map and transform structured json data.
brew install jq
(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)" |
#!/bin/sh | |
git init | |
cat << EOF | tee .gitignore | |
# For PCBs designed using KiCad: http://www.kicad-pcb.org/ | |
# Format documentation: http://kicad-pcb.org/help/file-formats/ | |
# Temporary files | |
*.000 |
"""Multilayer DXF demo. | |
Demo of proposed multilayer DXF utility class for `CadQuery <https://github.com/CadQuery/cadquery>`_. | |
See ` DXF multilayer support #1267 <https://github.com/CadQuery/cadquery/pull/1267>`_. | |
""" | |
import cadquery as cq | |
from osr_common.cq_dxf import DxfDocument |
git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD |
from math import radians, sqrt, tan | |
from typing import Tuple | |
import cadquery as cq | |
def reflect_xy(point: Tuple[float, float]) -> Tuple[float, float]: | |
"""Reflect point in axis x=y. | |
Reflect by reversing tuple. |
999 | |
{"supplier": "Aluminium Extrusion Company", "url": "https://alexco.co.nz", "part": "AEC 2020", ""description": "2020 V-slot Aluminum Extrusion"} | |
0 | |
SECTION | |
2 | |
HEADER | |
9 | |
$ACADVER | |
1 | |
AC1021 |
curl --silent --show-error https://api.github.com/users/sethfischer | python -m json.tool | pygmentize -l javascript |
# Database dump is compressed with this command | |
# xz --keep --compress mysql-dump.sql | |
# Drop and create database | |
docker exec -e "MYSQL_PWD=password" -i project_mysql_1 mysql -uroot <<< "DROP DATABASE database_name;" | |
docker exec -e "MYSQL_PWD=password" -i project_mysql_1 mysql -uroot <<< "CREATE DATABASE database_name;" | |
docker exec -e "MYSQL_PWD=password" -i project_mysql_1 mysql -uroot <<< "SHOW DATABASES;" | |
# Restore database | |
pv mysql-dump.sql.xz | xz --decompress --stdout | docker exec -e "MYSQL_PWD=password" -i project_mysql_1 mysql -uroot database_name |
# Files to exclude when creating archive | |
## General | |
*.git export-ignore | |
*.gitignore export-ignore | |
*.gitattributes export-ignore | |
*README.* export-ignore | |
*readme.* export-ignore |