Skip to content

Instantly share code, notes, and snippets.

View joernroeder's full-sized avatar

Jörn Röder joernroeder

View GitHub Profile
@joernroeder
joernroeder / machine.js
Last active May 29, 2020 13:08
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@joernroeder
joernroeder / machine.js
Last active May 25, 2020 21:14
Generated by XState Viz: https://xstate.js.org/viz
/**
* Account Machine
* ---
*
* Type: Backend
*
*/
if (console) {
console.clear()
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@joernroeder
joernroeder / machine.js
Last active May 15, 2020 20:36
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@joernroeder
joernroeder / addVuexModel.js
Last active July 6, 2018 13:51
Add Vuex Model
/*
* Adds a computed property name to your component which uses the specified getter and actionName for reactivity.
* Afterwards you can bind the property name to e.g. form elements like any other property via `v-model`.
* See https://vuejs.org/v2/guide/forms.html for more details
*
* import addVuexModel from './utils/addVuexModel'
* {
* computed: {
* ...addVuexModel({
* name: 'propertyName',
@joernroeder
joernroeder / ascii-snowflakes.txt
Created December 21, 2015 21:15
ascii snowflakes
extracted from http://chris.com/ascii/index.php?art=holiday/christmas/other
-=[ snowflakes ]=- 1/97
* . *
. _\/ \/_ .
\ \ / /
-==>: X :<==-
/ _/ \_ \
@joernroeder
joernroeder / processing-list-files-in-folder.pde
Last active September 7, 2015 12:22
Returns an array with all filenames found in the given path filtered by the given extension (optional).
import java.io.File;
import java.io.FilenameFilter;
// returns all filenames
String[] processFolder(String path) {
return processFolder(path, null);
}
// returns all filenames filtered by extension
String[] processFolder(String path, final String ext) {
java.io.File folder = new java.io.File(path);
import java.awt.Robot;
import java.awt.Rectangle;
import java.awt.AWTException;
class SimpleScreenCapture {
Robot robot;
PImage screenshot;
SimpleScreenCapture() {
Screens
- Titel screen?
- Intrografiken/ Vergleich (Daten von Pressestelle)
- Linkliste Unis / Screens
- Stockfotoalumni
- Plakat Slawek / Website Alumniprojekt
- Kontakt (?)
@joernroeder
joernroeder / subclass-factory-example.js
Last active August 29, 2015 14:23
Javascript Factory example which returns different (Sub)Classes
// class pattern helpers
//
// @see https://stackoverflow.com/questions/1595611/how-to-properly-create-a-custom-object-in-javascript
//
Function.prototype.makeSubclass= function() {
function Class() {
if ('_init' in this)
this._init.apply(this, arguments);
}
Function.prototype.makeSubclass.nonconstructor.prototype= this.prototype;