Skip to content

Instantly share code, notes, and snippets.

View monkstone's full-sized avatar

Martin Prout monkstone

View GitHub Profile
@monkstone
monkstone / runner.rb
Created September 28, 2019 06:04
Runner with force option
# frozen_string_literal: false
require 'optparse'
require 'fileutils'
require 'rbconfig'
require_relative '../jruby_art/config'
require_relative '../jruby_art/version'
require_relative '../jruby_art/java_opts'
require_relative '../jruby_art/launcher'
# processing wrapper module
@monkstone
monkstone / picrate_install.sh
Last active October 29, 2019 20:06
Script to install picrate on raspberrypi
#! /usr/bin/env bash
JRVERSION="9.2.8.0"
MRI_RUBY="2.5.0"
GEM="${HOME}/.gem/ruby/${MRI_RUBY}"
JDK_VERSION="8"
function install_jruby {
echo "installing jruby please wait"
if [ ! -f "jruby-dist-${JRVERSION}-bin.tar.gz" ]; then
wget "https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRVERSION}/jruby-dist-${JRVERSION}-bin.tar.gz"

Building Processing

Processing's ant-based build chain can create executables natively runnable for Linux, Mac, and Windows.



Pre-Requisites

Although Processing will download and use its own copy of OpenJDK and OpenJFX, the build chain itself requires Java 11+ and Ant in addition to getting a copy of the Processing source code.

@monkstone
monkstone / sutcliffe.rb
Created January 10, 2019 09:36
Recursive Pentagons
attr_reader :strut_factor, :renderer
MAX_LEVEL = 5
def setup
sketch_title 'Recursive Fractals'
@strut_factor = 0.2
@renderer = AppRender.new self # so we can send Vec2D :to_vertex
background(255)
no_loop
end
@monkstone
monkstone / toxi.pde
Created December 19, 2018 11:17
toxi
/**
* Simple recursive branching system inspired by mycelium growth
*
* This file is part of the SAC 2013 workshop project
* (c) 2013 Karsten Schmidt
* LGPLv3 licensed
*/
import toxi.geom.*;
import toxi.processing.*;
import java.util.*;
@monkstone
monkstone / README.md
Last active December 11, 2018 15:53
RaspberryPI Status

Raspberry Pi 3 Model B+

sudo apt-get update
sudo apt-get dist-upgrade

Kernel

uname -a
@monkstone
monkstone / Rakefile
Last active May 25, 2019 14:41
Auto Install jruby and picrate on RaspberryPI (or debian linux)
# frozen_string_literal: true
require 'rake/clean'
require 'erb'
JRUBY_VERSION = '9.2.7.0'
MRI_RUBY = '2.3.0'
PRIORITY = '51'
TAR_BALL = "jruby-dist-#{JRUBY_VERSION}-bin.tar.gz"
TAR_BALL_SHA = [TAR_BALL, 'sha256'].join('.')
@monkstone
monkstone / Rakefile
Last active October 25, 2019 06:01
Install JRuby and PiCrate on debian (Rakefile)
# frozen_string_literal: true
require 'rake/clean'
WARNING = <<-WARN.freeze
WARNING: Something has gone wrong with download
check that the JRUBY_VERSION and download path
are still valid
WARN
@monkstone
monkstone / jruby_art.geany
Last active November 10, 2018 13:40
Geany project file for JRubyArt on RaspberryPI
[editor]
line_wrapping=false
line_break_column=72
auto_continue_multiline=true
[file_prefs]
final_new_line=true
ensure_convert_new_lines=false
strip_trailing_spaces=false
replace_tabs=true
@monkstone
monkstone / picrate.geany
Created November 10, 2018 08:50
Geany Project File for PiCrate
[editor]
line_wrapping=false
line_break_column=72
auto_continue_multiline=true
[file_prefs]
final_new_line=true
ensure_convert_new_lines=false
strip_trailing_spaces=false
replace_tabs=true