Skip to content

Instantly share code, notes, and snippets.

View kewp's full-sized avatar

kewp

  • Durban
View GitHub Profile
@kewp
kewp / resume.json
Last active January 30, 2023 04:55
{
"meta": { "theme": "macchiato" },
"basics": {
"name": "Karl Penzhorn",
"label": "Data aquisition and interactive apps",
"email": "[email protected]",
"summary": "Experienced data professional with a background in mechanical engineering. Skilled in data acquisition, cleaning, and interaction, as well as front-end development and AI/mathematical modeling. Holds a master's degree in mechanical engineering.",
"location": {
"address": "25 Protea Road",
"postalCode": "7708",
@kewp
kewp / watch.js
Created March 1, 2022 10:58
Reload vite process when file changes (for plugin development)
// this is for when you want to have vite reload when you change
// a plugin you're working on locally.
// i.e. in vite.config.js:
// import plugin from 'my-plugin';
// export default {
//. plugins: [plugin()]
// }
// where your plugin is linked using npm link (or pnpm link)
// and you want your example / test project to reload as soon as you change
// the source of your plugin (in a separate folder / repo).
@kewp
kewp / Movie.java
Created September 6, 2018 13:03
Kotlin Data Class - Java Equivalent
// Kotlin: data class Movie( val id: Int, val name: String )
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
public final class Movie {
private final int id;
@NotNull
private final String name;
package;
import flixel.FlxSprite;
/**
* ...
* @author ...
*/
class Player extends FlxSprite
{
/**
* Load an image from an embedded graphic file.
*
* @param Graphic The image you want to use.
* @param Animated Whether the Graphic parameter is a single sprite or a row of sprites.
* @param Width Optional, specify the width of your sprite (helps FlxSprite figure out what to do with non-square sprites or sprite sheets).
* @param Height Optional, specify the height of your sprite (helps FlxSprite figure out what to do with non-square sprites or sprite sheets).
* @param Unique Optional, whether the graphic should be a unique instance in the graphics cache. Default is false.
* @param Key Optional, set this parameter if you're loading BitmapData.
* @return This FlxSprite instance (nice for chaining stuff together, if you're into that).
public function new(X:Float = 0, Y:Float = 0, ?SimpleGraphic:Dynamic)
{
super(X, Y);
if (SimpleGraphic != null)
{
loadGraphic(SimpleGraphic);
}
}