Skip to content

Instantly share code, notes, and snippets.

View tomacorp's full-sized avatar

Tom Anderson tomacorp

  • On Github, I do not represent any companies, I only represent myself.
  • Rohnert Park, California
View GitHub Profile
@tomacorp
tomacorp / BUILD_CIRCUITPYTHON
Created November 26, 2019 04:59
Build script for circuitpython compile
#
# Tom Anderson
# Mon Nov 25 20:58:36 PST 2019
# This is for OS X Mojave 10.14.6.
# The goal is to be able to compile the firmware for the AdaFruit EDGE badge.
#
# Downloaded ~/Downloads/Homebrew-brew-2.1.16-127-ga1939cf.tar.gz
# from github
# Needs latest command line tools.
# Updated XCode to 11.2.1.
@tomacorp
tomacorp / TCL_OS_X_BUILD_FROM_SOURCE
Last active November 23, 2017 00:53
TCL and Tk with tclreadline, tcllib, and itcl - Built from source code on OS X
# This file is a github gist, stored at:
# Author: Tom Anderson
# Date: Sun Nov 19 11:34:37 PST 2017
# Language: bash shell script
# Background:
# This is for OS X. I don't use brew and don't change any system files.
# My method is to download the gnu tools as needed, and build and install in /usr/local.
# The Xcode clang compiles everything.
# I write scripts for everything that I build. This is one of them.
@tomacorp
tomacorp / build_kicad.md
Last active August 29, 2015 14:23
Build Kicad nightly in Ubuntu 14.04

Why

The goal is to build a Kicad nightly release and run it on an OS X computer. Since the Kicad build appears to work best on Linux, I am using a virtual machine.

What

VM software is VirtualBox 4.3.28 https://www.virtualbox.org The guest OS is Desktop Ubuntu 14.04.2 amd64 http://www.ubuntu.com/download/desktop/ There are performance problems with VirtualBox, so I am trying these same instructions again with VMWare Fusion.

@tomacorp
tomacorp / INSTALL_OPENMPI
Last active August 29, 2015 14:23
Script to build OpenMPI on OS X using Xcode
cd openmpi-1.8.5
./configure --prefix=/usr/local
make -j6
sudo make install
@tomacorp
tomacorp / BUILD_NGSPICE
Last active August 29, 2015 14:23
Scripts to build NGSpice on OS X using Xcode command line tools
#!/bin/bash
# BUILD_NGSPICE
# Copyright (c) 2015 Tom Anderson.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
@tomacorp
tomacorp / displayImagePySide.py
Last active August 29, 2015 14:22
Demonstrate reading an image from a file as data, and displaying it with PySide
"""
The purpose of this program is to demonstrate reading an image from a file as data,
and then displaying it with PySide.
For this example to work, the program must be run from a place with a subdirectory called t
with a file yellow.png in it. This can be changed around line 86.
"""
from PySide import QtGui
from PySide.QtGui import (QApplication, QMainWindow)
@tomacorp
tomacorp / displayImagePyPlot.py
Created June 9, 2015 05:51
Demonstrate reading an image file as data and displaying it with pyplot
"""
The purpose of this program is to demonstrate reading an image from a file as data,
and then displaying it with pyplot.
For this example to work, the program must be run from a place with a subdirectory called t
with a file yellow.png in it. This can be changed around line 52.
"""
import imghdr
import ntpath
import skimage