Skip to content

Instantly share code, notes, and snippets.

View gepatto's full-sized avatar

Patrick Gutlich gepatto

  • Gepatto Interactive Media
  • Breda, The Netherlands
View GitHub Profile
// This #include statement was automatically added by the Particle IDE.
#include "RCSwitch/RCSwitch.h"
/*
This is a minimal sketch without using the library at all but only works for
the 10 pole dip switch sockets. It saves a lot of memory and thus might be
very useful to use with ATTinys :)
http://code.google.com/p/rc-switch/
*/
@gepatto
gepatto / 1-Readme.md
Last active January 13, 2021 16:24
Install set versions of haxe, openfl and lime on Raspberry Pi 3 running Stretch

#DEPRECATED, here for historic value

UPDATED to work with Raspbian Stretch

These scripts install a set version of openfl and lime in this case openfl 8.4.0 and Lime 7.0.0 (but you change those) Sometimes the latest version of lime or openfl doesn't work (yet) on the Raspberry Pi.

There's 2 scripts here to install haxe and openfl on Raspberry Pi. One that doesn't ask any questions and just installs everything

@gepatto
gepatto / install_haxe_from_docker.sh
Last active March 4, 2023 19:52
DEPRECATED: install haxe from docker and copy to system (needs docker installed). Run as ./install_haxe_from_docker.sh 4.1.5-buster
#!/bin/bash
#DEPRECATED
BLACK="[30m"
RED="[31m"
GREEN="[32m"
YELLOW="[33m"
BLUE="[34m"
PURPLE="[35m"
@gepatto
gepatto / sdl_vlc_pi.cpp
Last active February 13, 2021 09:09
SDL VLC Pi test
// g++ -o sdlvlcpi sdl_vlc_pi.cpp `sdl2-config --cflags --libs` -l vlc
// libSDL and libVLC sample code.
// License: [http://en.wikipedia.org/wiki/WTFPL WTFPL]
//
// sdlvlcpi /path/to/video (default render)
// sdlvlcpi /path/to/video -t (render to texture)
#include <stdio.h>
#include <stdint.h>
#include <math.h>
@gepatto
gepatto / makepico.sh
Last active April 19, 2021 08:12
Create a minimal Raspberry Pi Pico C-language project and vscode workspace and open it in vscocde
#!/bin/zsh
#
# makepico.sh
#
# Create a minimal Raspberry Pi Pico C-language project and open it in vscocde
#
# @original author Tony Smith
# @copyright 2021, Tony Smith
# @version 1.0.0
@gepatto
gepatto / hxworkspace.sh
Created May 5, 2021 09:31
Create VSCode workspacefile with haxe and lime recommend extensions and open in VSCode
#!/bin/bash
# get working directory and grab foldername
NAME=`pwd`;
subdir="${NAME##*/}"
# create workspacefile
WORKSPACEFILE='{"folders":[{"path": "."}],"settings":{},"extensions":{"recommendations":["vshaxe.haxe-extension-pack","openfl.lime-vscode-extension"]}}'
echo $WORKSPACEFILE >> "${subdir}.code-workspace"
@gepatto
gepatto / CompleteHaxeLimeInstall_Menu_RPi.sh
Last active December 14, 2023 10:08
Install Haxe,Lime and OpenFL on a Raspberry Pi running PiOS (raspbian bullseye)
#!/bin/bash
##########################################
# Gepatto 2023 #
# find me on openfl or haxe discord #
##########################################
### Color Variables ###
BLACK="\e[30m"
RED="\e[31m"
function cmToPoints(cm) { return cm * 28.3464567; }
function pointsToCm(pt) { return pt * 0.035277776; }
var names = ["Foo", "Bar"];
//
var doc;
var layer;
var docWidth = cmToPoints(80);
@gepatto
gepatto / duplicateGroupToGrid.jsx
Last active February 25, 2024 16:33
Illustrator script: Create Duplicates of Selected group in a grid fitting inside a specified area setting it text to values from an array
/**
* @author Patrick Gutlich
* @year 2024
* @description Create Duplicates of Selected group in a grid fitting inside a specified area setting it text to values from an array
*/
/**
* Helpers
*/
function cmToPoints(cm) {