Skip to content

Instantly share code, notes, and snippets.

View bert's full-sized avatar
🎯
Focusing

Bert Timmerman bert

🎯
Focusing
View GitHub Profile
@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 / .gitignore
Last active January 16, 2019 19:18
805x - Morse Hello World
*~
*.bak
*.asm
*.ihx
*.lnk
*.lst
*.map
*.mem
*.rel
*.rst
@bert
bert / Makefile
Last active February 10, 2019 04:27 — forked from nolim1t/socket.c
HTTP Request in C using low level write to socket functionality
all: socket.c
gcc socket.c -o soc
clean:
rm -f *~
rm -f *.o
rm -f soc
@bert
bert / get_swap_usage.sh
Last active December 20, 2015 11:49 — forked from opposite-bracket/get_swap_usage.sh
Get the swap usage
#!/bin/bash
# Get current swap usage for all running processes
# Erik Ljungstrom 27/05/2011
# Modified by Mikko Rantalainen 2012-08-09
# Pipe the output to "sort -nk3" to get sorted output
SUM=0
OVERALL=0
for DIR in `find /proc/ -maxdepth 1 -type d -regex "^/proc/[0-9]+"`
do
PID=`echo $DIR | cut -d / -f 3`
@bert
bert / geo.html
Created May 12, 2012 07:46 — forked from mirontoli/geo.html
geolocation test
<!DOCTYPE html>
<!-- Comes from http://zeeshanakhter.com/2012/03/15/find-out-your-visitors-position-using-html5-geolocation/ -->
<html>
<head>
<title>HTML5 Geolocation</title>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
// Integration with google maps
function loadMap(lat, lng) {
var latlng = new google.maps.LatLng(lat, lng);