Skip to content

Instantly share code, notes, and snippets.

View digitsensitive's full-sized avatar
👋
Working from home

Eric digitsensitive

👋
Working from home
View GitHub Profile
@digitsensitive
digitsensitive / arch-meets-argon-one-up-cm5-laptop.md
Last active March 1, 2026 20:31
Arch Linux ARM on Argon ONE UP CM5

Arch Linux ARM on Argon ONE UP CM5

Prepare SD-Card

Install Raspberry Pi OS (64-bit) f.e. via Raspberry Pi Imager on your SD-Card.

Prepare NVMe drive

Boot with the SD-Card inside Raspberry Pi OS. Open a Terminal.

export abstract class PizzaFactory {
protected abstract create(): Pizza;
}
export class ProsciuttoFactory extends PizzaFactory {
public create(): Pizza {
let pizza = new Pizza();
pizza.addIngredients([ tomatoes, mozzarella, ham, salt, oliveOil ]);
return pizza;
}
export class SimpleEnemyFactory {
public create(enemyType: string): Enemy {
switch (enemyType) {
case "bobbie":
return new Bobbie();
case "wallace":
return new Wallace();
@digitsensitive
digitsensitive / game-scene.ts
Last active March 2, 2019 15:02
Let's create a dungeon generator for Phaser 3 using Binary Space Partitioning - Create Instance
this.treeInstance = new Tree({
map: {
width: this.game.canvas.width,
height: this.game.canvas.height,
tileSize: 8
},
nodes: { size: { min: 10, max: 20 } }
});
@digitsensitive
digitsensitive / game-scene.ts
Created March 2, 2019 14:54
Let's create a dungeon generator for Phaser 3 using Binary Space Partitioning - Create Instance
this.treeInstance = new Tree({
width: this.game.canvas.width,
height: this.game.canvas.height,
tileSize: 8,
leafSize: { min: 10, max: 20 }
});
@digitsensitive
digitsensitive / bird.ts
Created February 8, 2019 22:49
Learn to create a HTML5 Game in 5 Minutes - Bird
update(): void {
// handle angle change
if (this.angle < 30) {
this.angle += 2;
}
// handle input
if (this.jumpKey.isDown && !this.isFlapping) {
// flap
this.isFlapping = true;
@digitsensitive
digitsensitive / game-scene.ts
Last active February 8, 2019 22:44
Learn to create a HTML5 Game in 5 Minutes - Game Scene
private addNewRowOfPipes(): void {
// update the score
this.registry.values.score += 1;
this.scoreText.setText(this.registry.values.score);
// randomly pick a number between 1 and 5
let hole = Math.floor(Math.random() * 5) + 1;
// add 6 pipes with one big hole at position hole and hole + 1
for (let i = 0; i < 10; i++) {
@digitsensitive
digitsensitive / game-scene.ts
Last active February 8, 2019 22:15
Learn to create a HTML5 Game in 5 Minutes - Game Scene
preload(): void {
this.load.pack(
"flappyBirdPack",
"./src/assets/pack.json",
"flappyBirdPack"
);
}
@digitsensitive
digitsensitive / game-scene.ts
Created February 8, 2019 22:13
Learn to create a HTML5 Game in 5 Minutes - Game Scene
init(): void {
this.registry.set("score", -1);
}
@digitsensitive
digitsensitive / game-scene.ts
Created February 8, 2019 22:11
Learn to create a HTML5 Game in 5 Minutes - Game Scene
export class GameScene extends Phaser.Scene {
constructor() {
super({
key: "GameScene"
});
}
}