Skip to content

Instantly share code, notes, and snippets.

@joakimbeng
joakimbeng / router.html
Last active March 15, 2024 06:18
A really simple Javascript router
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Building a router</title>
<script>
// Put John's template engine code here...
(function () {
// A hash to store our routes:
@phsym
phsym / hashtable.c
Last active February 21, 2024 12:57
An hashtable implementation in C
/*
* Author : Pierre-Henri Symoneaux
*/
#include <stdlib.h>
#include <string.h>
//Hashtable element structure
typedef struct hash_elem_t {
struct hash_elem_t* next; // Next element in case of a collision