Skip to content

Instantly share code, notes, and snippets.

View chriswmartin's full-sized avatar

Chris Martin chriswmartin

View GitHub Profile
#!/bin/bash
user=bakercp
if [ -f "addons.make" ]
then
while read addons; do
if [ -d ../../addons/"$addons" ];
then
cd ../../addons/$addons; git checkout develop; git pull; cd -

Keybase proof

I hereby claim:

  • I am christopherwmartin on github.
  • I am cwmartin (https://keybase.io/cwmartin) on keybase.
  • I have a public key ASB7xcF-E2bDXT-5gnbYCpd7Yt6OsNKiX8zUJWYtBRXMpgo

To claim this, I am signing this object:

from PIL import Image
import numpy as np
import os, random
from mastodon import Mastodon
folder=r"/home/cwm/glitchgarden/images/"
a=random.choice(os.listdir(folder))
print(a)

Keybase proof

I hereby claim:

  • I am chriswmartin on github.
  • I am cwmartin (https://keybase.io/cwmartin) on keybase.
  • I have a public key whose fingerprint is 307A 3C70 EDE3 6DA7 DB31 8878 8180 C030 1E28 F839

To claim this, I am signing this object:

@chriswmartin
chriswmartin / openpgp.txt
Created January 28, 2018 16:08
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:e242feb164af9b11c94ac8cc782fc21bb4ed4872]
@chriswmartin
chriswmartin / raspberrypi-facetracker-error.txt
Created February 25, 2018 14:52
RaspberryPi ofxFaceTracker error
pi@raspberrypi:~/of/apps/myApps/face-saver-2/bin $ ./face-saver-2
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 720x480
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 720x480
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0xbc07b8
libEGL warning: DRI3: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
[ error ] ofAppEGLWindow: createSurface(): eglInitialize returned EGL_FALSE
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
if(x <= (width)){
x+=250;
} else {
ofSaveImage(temp, ofToString(img_count) + ".png");
img_count++;
x=0;
string convert_command = "cd" + ofToDataPath(path) + " && convert -delay 35 -loop 0 *.png" + time + ".gif &";
system(convert_command);
}
sleep(1);
@chriswmartin
chriswmartin / radio_music.py
Last active March 18, 2018 01:18
John Cage's "Radio Music" in python
#!/usr/bin/python3
import random
import subprocess
# requires vlc
stations = open('stations.txt').read().splitlines();
play_times = range(1,8);