Skip to content

Instantly share code, notes, and snippets.

View ziord's full-sized avatar
🎯
Focusing

ziord

🎯
Focusing
  • Canada
View GitHub Profile
@ziord
ziord / mongodb_cheat_sheet.md
Created September 20, 2021 09:23 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@ziord
ziord / utf8_stuff.c
Last active February 23, 2023 16:01
A simple utf-8 utility for C byte strings
#include <stdio.h>
#include <stdlib.h>
/*
* Simple utf-8 utility for C byte strings.
* References: https://www.instructables.com/Programming--how-to-detect-and-read-UTF-8-charact/
*/
uint32_t u8_get_char(const char *str, int *index){
// use of binary integer literals is accepted in GCC, not sure of other C compilers.