Skip to content

Instantly share code, notes, and snippets.

View danomatika's full-sized avatar

Dan Wilcox danomatika

View GitHub Profile
@danomatika
danomatika / say-result
Last active December 19, 2015 06:19
small script for Mac OSX which speaks the result of a given command, useful for knowing when a long build is finished
#! /bin/bash
#
# say-result: speaks the result of a given command
# put this in a location that is added to the shell bin path
#
# usage: say-result [command & options]
#
# examples:
# say-result make
# say-result false
@danomatika
danomatika / Makefile.osx
Created July 2, 2013 17:13
FreeImage Makefile for Mac OSX updated to build 32/64 bit fat libs, tested with OSX 10.8 & XCode 4.6
# Configuration for Max OSX, builds fat 32/64 bit static & dynamic libs
include Makefile.srcs
# Update this based on your installed SDKs
MACOSX_SDK = 10.8
MACOSX_MIN_SDK = 10.6
# Find SDK path via xcode-select, backwards compatible with Xcode vers < 4.5
MACOSX_SYSROOT = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(MACOSX_SDK).sdk
@danomatika
danomatika / Makefile.iphone
Created July 2, 2013 17:15
FreeImage Makefile for iOS updated for newer version of XCode, tested with OSX 10.8 & XCode 4.6
# Configuration for iPhone OS, builds static libs for iOS and the iOSSimulator
#
# You can make a fat lib (iOS + iOSSimulator) using lipo:
# lipo -c libfreeimage-simulator.a libfreeimage-armv7.a -o libfreeimage.a
#
# Example: build & link fat lib for armv6, armv7, armv7s, & simulator
#
# make -f Makefile.iphone
# sed -i tmp "s|ARCH_PHONE =.*|ARCH_PHONE = armv7s|" Makefile.iphone
# make -f Makefile.iphone
@danomatika
danomatika / check-for-src-pattern
Last active January 22, 2021 13:55
a simple script to check for a given string pattern in any .c, .h, .cpp, .cxx, .m, .mm, etc source files in the current directory and any subdirectories
#! /bin/bash
#
# simple script to check for a given string pattern in any
# .c, .h, .cpp, .cxx, .m, .mm, etc source files
#
# you can pass your own list of extensions/file patterns as well:
# check-for-src-pattern . "foo" .h .cpp .py .sh Makefile
#
# Dan Wilcox <danomatika@gmail.com> 2014, 2016
#
@danomatika
danomatika / build-nn_tilde-macos.sh
Created July 29, 2022 17:08
script to download and build the nn~ Pure Data external
#! /bin/sh
#
# download and build nn~ external for puredata on macOS:
# https://github.com/acids-ircam/nn_tilde
#
# notes:
# * binary external is placed in root dir
# * there doesn't appear to be a help file
# * on M1 machines. Pd has to be run in Rosetta using x86_64 arch, ie.
# arch -X86_64 /Applications/Pd-0.52-2.app/Contents/Resources/bin/pd
#! /bin/sh
#
# build nn~ external for puredata on macOS using libtorch from homebrew:
# https://github.com/acids-ircam/nn_tilde
#
# 1. clone nn_tilde
# 2. install libtorch via homebrew: brew install libtorch
# 3. place this in the nn_tilde directory and make executable:
# chmod +x build-nn_tilde-macos-brew.sh
# 4. run: ./build-nn_tilde-macos-brew.sh