Skip to content

Instantly share code, notes, and snippets.

Notes on how to setup a mac for museum installations

What didn't work reliably

  1. executing a login script on launchctl to start an application (eg. Processing)
  2. shutting down automatically and closing all apps including the terminal

What worked better

  1. using a shell script run as a login item
  2. setting pmset to poweron and shutdown
  3. make the necessary settings in Systems Settings and the application settings of apps used (eg. terminal, Google Chrome, etc.)
@sojamo
sojamo / byteArrayToOscMessage.java
Created July 20, 2018 06:32
oscP5, byte array to OscMessage
// oscP5 processing example: byte array to OscMessage
// https://github.com/sojamo/oscp5
// tested with OscP5 0.9.9
import java.util.*;
import oscP5.*;
void setup() {
OscP5 osc = new OscP5(this, 12000);
byte[] b1 = new byte[] {0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x2c, 0x73, 0x00, 0x00, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x00, 0x00};
/**
* SerialIndex, send int example A
* In this example variable var1 is added to SerialIndex and
* is monitored for changes over time. the value of var1 is
* continuously increasing and you will see the current state
* inside the Serial Monitor when active.
* To make changes to var1, use the Serial Monitor's send option
* and type (make sure the line ending is set to 'Both NL & CR'):
* var1=0
* this will reset the value of var1 to 0.
@sojamo
sojamo / controlP5_template.pde
Created March 11, 2016 01:29
A template sketch for using ControlP5 in Processing
/* copy/paste template for controlP5 and processing */
import controlP5.*;
float a;
ControlP5 cp5;
void setup() {
size(400,400);
cp5 = new ControlP5(this);
@sojamo
sojamo / oscP5_template.pde
Last active March 11, 2016 01:27
A Processing template sketch for oscP5
/* copy/paste template for oscP5 and processing */
import oscP5.*;
import netP5.*;
OscP5 osc;
NetAddress addr;
void setup() {
osc = new OscP5(this, 12000);