Skip to content

Instantly share code, notes, and snippets.

View hcwiley's full-sized avatar

H. Cole Wiley hcwiley

View GitHub Profile
@hcwiley
hcwiley / install_meshlab_from_source.md
Last active January 14, 2020 16:20
Install Meshlab from source
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Please contact your system administrator.
Add correct host key in /Users/neilsongamble/.ssh/known_hosts to get rid of this message.
@hcwiley
hcwiley / loadFile.m
Created March 26, 2019 20:58
Load a USDZ, OBJ, STL, or PLY into a SCNNode using ModelIO
#import <SceneKit/ModelIO.h>
- (SCNNode *) loadFileIntoSCNNode:(NSString *)path {
// Get the path as a file url
NSURL *url = [NSURL fileURLWithPath:path];
// Load the file using Model IO.
// OBJ, STL, PLY, and USDZ are supported. Although binary PLY is not, so watch out.
MDLAsset *asset = [[MDLAsset alloc] initWithURL:url];
// Load the textures, not sure this is needed but what the heck!
[asset loadTextures];
@hcwiley
hcwiley / build_vtk_ios.sh
Created November 2, 2018 17:22
Helper shell script for configuring and building VTK for iOS
# make sure we've got a fresh directory to work in, and our install directory exists
rm -rf ./* ; mkdir install
# Change this to the path of your vtk github source
export PATH_TO_VTK_SRC=$PWD/../vtk
# How many theads do you want to occupy with building?
export NUMBER_OF_BUILD_THREADS=8
cmake \
-DCMAKE_BUILD_TYPE=MinSizeRel \
//Pin connected to latch pin (ST_CP) of 74HC595
const int latchPin = 8;
//Pin connected to clock pin (SH_CP) of 74HC595
const int clockPin = 12;
////Pin connected to Data in (DS) of 74HC595
const int dataPin = 11;
void setup() {
//set pins to output because they are addressed in the main loop
pinMode(latchPin, OUTPUT);
#define SHIFTDATA 11
#define SHIFTCLOCK 13
#define SHIFTLATCH 10
// the setup routine runs once when you press reset:
void setup() {
// open a serial port
Serial.begin(9600);
// set up shift register pins
int row[8] = {7, 9, 6, 8, 2, 5, 3, 4};
int col[8] = {15, 10, 11, 13, 12, 14, 16, 17};
int accl_x = A5;
int accl_y = A4;
// the setup routine runs once when you press reset:
void setup() {
// open a serial port
int row[8] = {7, 9, 6, 8, 2, 5, 3, 4};
int col[8] = {15, 10, 11, 13, 12, 14, 16, 17};
int accl_x = A5;
// the setup routine runs once when you press reset:
void setup() {
// open a serial port
Serial.begin(9600);
@hcwiley
hcwiley / 8x8Tester.ino
Last active August 29, 2015 14:02
8x8 matrix tester
int row[8] = {7, 9, 6, 8, 2, 5, 3, 4};
int col[8] = {15, 10, 11, 13, 12, 14, 16, 17};
// the setup routine runs once when you press reset:
void setup() {
// open a serial port
Serial.begin(9600);
// initialize the row and column pins as outputs, set rows low, set columns high
for (int i = 0; i < 8; i++) {
@hcwiley
hcwiley / makeRoutes.py
Created April 16, 2013 18:55
works with https://github.com/jwietelmann/express3_boilerplate to build out routes based on a baseModel
import os, sys
models = ['foo', 'bar', 'fooBar']
baseModel = 'baseModel'
os.chdir('routes/ui')
extension = ".js"
for model in models:
f = open("%ss%s" % (baseModel, extension ))
newLines = []
for line in f.readlines():
line = line.replace("%s" % baseModel, "%s" % model)