Skip to content

Instantly share code, notes, and snippets.

View bert's full-sized avatar
🎯
Focusing

Bert Timmerman bert

🎯
Focusing
View GitHub Profile
HOW TO READ BAR CODES... (everyone must know)
ALWAYS READ THE LABELS ON THE FOODS YOU BUY--NO MATTER WHAT THE FRONT OF THE BOX OR PACKAGE SAYS, TURN IT OVER AND READ THE BACK CAREFULLY!
With all the food and pet products now coming from China, it is best to make sure you read label at the supermarket and especially when buying food products.
Many products no longer show where they were made, only give where the distributor is located.
The whole world is concerned about China-made "black-hearted goods".
@bert
bert / encoder.c
Created October 18, 2021 19:10 — forked from lambert/encoder.c
8051 Encoder
/*!
* \file encoder.c
*
* Date: 22/01/2019
*/
#include <stdio.h>
#include <8052.h>
@bert
bert / Q_rsqrt,c
Created October 18, 2021 19:05 — forked from lambert/Q_rsqrt.c
#include <stdint.h>
float Q_rsqrt (float number)
{
const float x2 = number * 0.5F;
const float threehalfs = 1.5F;
union {
float f;
uint32_t i;
} conv = { .f = number };
@bert
bert / README.md
Created October 17, 2021 22:49
GLFW Simple tutorial demo
@bert
bert / Makefile.example
Last active February 23, 2024 05:52
GTK4 Building applications
CC ?= gcc
PKGCONFIG = $(shell which pkg-config)
CFLAGS = $(shell $(PKGCONFIG) --cflags gtk4)
LIBS = $(shell $(PKGCONFIG) --libs gtk4)
GLIB_COMPILE_RESOURCES = $(shell $(PKGCONFIG) --variable=glib_compile_resources gio-2.0)
GLIB_COMPILE_SCHEMAS = $(shell $(PKGCONFIG) --variable=glib_compile_schemas gio-2.0)
SRC = exampleapp.c exampleappwin.c exampleappprefs.c main.c
BUILT_SRC = resources.c
@bert
bert / Makefile
Created October 15, 2021 06:56
GTK4 Building user interfaces
CFLAGS = -Wall -g `pkg-config --cflags gtk4`
LDFLAGS = `pkg-config --libs gtk4`
all: main.c
$(CC) -o main main.c $(CFLAGS) $(LDFLAGS)
clean:
rm -f *~
rm -f *.o
rm -f main
@bert
bert / Makefile
Created October 15, 2021 06:40
GTK4 Custom drawing
CFLAGS = -Wall -g `pkg-config --cflags gtk4`
LDFLAGS = `pkg-config --libs gtk4`
all: main.c
$(CC) -o main main.c $(CFLAGS) $(LDFLAGS)
clean:
rm -f *~
rm -f *.o
rm -f main
@bert
bert / Makefile
Last active October 14, 2021 19:24
GTK4 Packing buttons
CFLAGS = -Wall -g `pkg-config --cflags gtk4`
LDFLAGS = `pkg-config --libs gtk4`
all: main.c
$(CC) -o main main.c $(CFLAGS) $(LDFLAGS)
clean:
rm -f *~
rm -f *.o
rm -f main
@bert
bert / Makefile
Created October 14, 2021 06:53
GTK4 Hello world
CFLAGS = -Wall -g `pkg-config --cflags gtk4`
LDFLAGS = `pkg-config --libs gtk4`
all: main.c
$(CC) -o main main.c $(CFLAGS) $(LDFLAGS)
clean:
rm -f *~
rm -f *.o
rm -f main
@bert
bert / Makefile
Created October 13, 2021 20:51
GTK4 example
CFLAGS = -Wall -g `pkg-config --cflags gtk4`
LDFLAGS = `pkg-config --libs gtk4`
all: main.c
$(CC) -o main main.c $(CFLAGS) $(LDFLAGS)
clean:
rm -f *~
rm -f *.o
rm -f main