Skip to content

Instantly share code, notes, and snippets.

@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"
@markknol
markknol / shadertoy.md
Last active March 28, 2024 16:14
Shader cheatsheet (from shadertoy)

This help only covers the parts of GLSL ES that are relevant for Shadertoy. For the complete specification please have a look at GLSL ES specification

Language:

Version: WebGL 2.0
Arithmetic: ( ) + - ! * / %
Logical/Relatonal: ~ < > <= >= == != && ||
Bit Operators: & ^ | << >>
Comments: // /* */
Types: void bool int uint float vec2 vec3 vec4 bvec2 bvec3 bvec4 ivec2 ivec3 ivec4 uvec2 uvec3 uvec4 mat2 mat3 mat4 mat?x? sampler2D, sampler3D samplerCube
Format: float a = 1.0; int b = 1; uint i = 1U; int i = 0x1;

@emxsys
emxsys / raspberry_pi_script_as_service.md
Last active April 6, 2024 13:46
How to run a python script as a service in Raspberry Pi - Raspbian Jessie

How to Run a Script as a Service in Raspberry Pi - Raspbian Jessie

By: Diego Acuña

Original Article: http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/

A pretty common task when using this device, is to run some script (for example a python script) as a service in the operating system so it can start on boot, stop and restart using systemctl and more. In this post I'm going to explain how to set a little script as a service using Raspbian Jessie in a Raspberry Pi.

Example Python Script

@thikade
thikade / mcp.desktop
Last active December 10, 2022 16:19
control minecraft-pi using xbox controller on raspberry pi
[Desktop Entry]
Name=Minecraft Pi MCP
Comment=Fun with Blocks
# TryExec=minecraft-pi
Exec=/home/pi/mcp.sh
Icon=/usr/share/pixmaps/minecraft-pi.png
Terminal=false
Type=Application
Categories=Application;Game;
StartupNotify=true
@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

@miltoncandelero
miltoncandelero / JsonClass.hx
Last active July 3, 2018 12:48
Creates typedefs based on a json example variable.
import haxe.Json;
/**
* Toss a Dynamic var and get a typedef declaration! (Inspired by http://json2csharp.com)
* (A bit of code stolen from https://gist.github.com/elsassph/16d3b2597f6a51b5817c2fa97dd7f505)
* @author Milton Candelero (Elemental Code)
*/
class JsonClass
{
@Beeblerox
Beeblerox / CRTFilter
Created July 23, 2017 09:34
CRTFilter for OpenFl 5.0
package;
import openfl.Lib;
import openfl.display.Shader;
import openfl.filters.BitmapFilter;
import openfl._internal.renderer.RenderSession;
import openfl.geom.Point;
/**
* ...
@jcward
jcward / Readme.txt
Created April 14, 2017 15:08
Generating iOS P12 / certs without Mac OSX Keychain (on linux, windows, etc)
1) Generate a private key and certificate signing request:
openssl genrsa -out ios_distribution.key 2048
openssl req -new -key ios_distribution.key -out ios_distribution.csr -subj '/emailAddress=me@example.com, CN=Example, C=US'
2) Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create
- choose Production -> App Store and Ad Hoc
3) Download the resulting ios_distribution.cer, and convert it to .pem format:
@sambler
sambler / multi_scene_setup.py
Last active June 7, 2021 07:47
Setup multi scene rendering
# made in answer to http://blender.stackexchange.com/q/74086/935
import bpy
master_render_scene_name = 'Multi_render'
base_path = '//renders/'
if master_render_scene_name not in bpy.data.scenes:
bpy.data.scenes.new(name=master_render_scene_name)
package;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.filters.ShaderFilter;
import openfl.Lib;
import openfl.events.Event;
import openfl.Assets;
import openfl.display.Sprite;
import openfl.utils.Float32Array;