Skip to content

Instantly share code, notes, and snippets.

Setup KiCad 6 on Mac w/ BREAKFAST libs

Install KiCad Stable

Find this online https://www.kicad.org/download/macos/

kicad-utils

This repo includes BREAKFAST created footprints, symbols and 3D step files.

Pull down repo: https://github.com/breakfastny/kicad-utils to somewhere on your laptop.

/*
* bits - pretty-print bits from a hex/dec/oct input
*
* cc -ansi -pedantic -Wall -o bits bits.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <stdint.h>
@mgunneras
mgunneras / facebook_url_to_id.sh
Created July 24, 2017 21:16
Fetch Facebook ID from URL
#! /bin/bash
URL=$1
curl -s https://findmyfbid.com/ -H 'accept: application/json' --data "url=$URL" | cut -d\: -f 2 | tr } ' '
@mgunneras
mgunneras / .bash_profile
Last active March 15, 2019 15:55 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@mgunneras
mgunneras / gist:19b1655cde8129b278c4
Created June 24, 2015 20:42
Relay controller CLI for controlanything.com R8x
#! /usr/bin/env python
# https://s3.amazonaws.com/assets.controlanything.com/manuals/R4xR8xPro.PDF
# Example usage to turn on relay index 1 3 and 6:
# ./relay.py --on 1 3 6
import serial
import time
class Relay(serial.Serial):
@mgunneras
mgunneras / thumbnailer.sh
Created January 17, 2015 22:07
Convert image files into smaller thumbnails using Imagemagick
#! /bin/bash
#
# Recursively convert image files in IN_DIR into smaller jpegs
# Copy all other files straight over
# Resulting files (including folder structure) ends up in in IN_DIR/../thumbs/
IN_DIR=$1
is_image() {
local name=$1
@mgunneras
mgunneras / pull_zmq.py
Created August 28, 2011 16:33
Publish data from file or stdin to a zmq socket
#! /usr/bin/env python
"""
Prints data from zmq PULL socket to stdout
"""
import zmq
import sys
def get_socket(host, port):
context = zmq.Context()
@mgunneras
mgunneras / printhid.c
Created August 28, 2011 16:14
Prints a HID device to stdout
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <dirent.h>
#include <linux/input.h>
#include <sys/types.h>
#include <sys/stat.h>
var http = require('http'),
host = 'aws01',
creation_delay = 5,
reporting_delay = 3000,
clients = [],
limit = process.argv[2] || 500,
headers = {
'Host' : host
};
#user nobody;
worker_processes 1;
worker_rlimit_nofile 500000;
events {
worker_connections 500000;
}
http {