Skip to content

Instantly share code, notes, and snippets.

View LemoNode's full-sized avatar

Robert Pettersson LemoNode

  • Sweden Gothenburg
View GitHub Profile
@LemoNode
LemoNode / index.html
Last active March 6, 2020 16:02
fart knockers 3
<head>
<title>Sommar 2020</title>
<meta charset="utf-8">
<style>
:root {
--width: 825px;
}
body {
margin: auto;
@LemoNode
LemoNode / test.html
Last active March 10, 2020 20:08
calendar with canvas test
<head>
<title>Calendar</title>
<meta charset="utf-8">
<style>
:root {
--nav-height: 120px;
}
body {
margin: auto;
@LemoNode
LemoNode / index.html
Last active May 17, 2020 22:08
simple sqlite/web server in go
<head>
<meta charset="utf-8">
<title>Pågåendelistan</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body onload="main()">
<nav>
<div id="nav-title">
<h2>Affektiva: Index</h2>
@LemoNode
LemoNode / index.html
Last active June 11, 2020 12:21
Simple collision detection / reaction for intersecting rectangles
<head>
<title>Collision</title>
<style>
canvas {
border: 1px solid #333;
}
</style>
</head>
@LemoNode
LemoNode / audio.ion
Created February 7, 2021 23:18
Ion raylib
// Audio device management functions
@foreign func InitAudioDevice();
@foreign func CloseAudioDevice();
@foreign func IsAudioDeviceReady(): bool;
@foreign func SetMasterVolume(volume: float);
// Wave/loading: Sound/unloading functions
@foreign func LoadWave(fileName: char* const): Wave;
@foreign func LoadWaveFromMemory(fileType: char* const, fileData: uchar* const, dataSize: int): Wave;
@foreign func LoadSound(fileName: char* const): Sound;
@LemoNode
LemoNode / array.h
Created February 16, 2022 23:17
A simple array/buffer datastructure
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
// Dynamic Array:
// A stretchy buffer datastructure and a macro interface for both the buffers and static arrays.
// Structure idea by Sean Barrett:
// https://github.com/nothings/stb/blob/master/deprecated/stretchy_buffer.h
typedef struct BufHdr BufHdr;