Skip to content

Instantly share code, notes, and snippets.

View emptyother's full-sized avatar

Tom A. Vibeto emptyother

View GitHub Profile
@tzal
tzal / uuid_from_bin.sql
Last active September 8, 2023 07:32
MySQL: convert BINARY(16) to GUID (UUID)
# MySQL: convert BINARY(16) to GUID (Microsoft-style UUID)
# 0x11223344556677889900AABBCCDDEEFF → '44332211-6655-8877-9900-AABBCCDDEEFF'
# Usage: CREATE TABLE example (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, guid BINARY(16) NOT NULL UNIQUE);
# SELECT id, uuid_from_bin(guid) FROM example;
# Tested on: MySQL 5.6, 5.7, 8.0
CREATE FUNCTION uuid_from_bin(b BINARY(16))
RETURNS char(36) CHARSET utf8
DETERMINISTIC
BEGIN
@tzal
tzal / uuid_to_bin.sql
Last active September 8, 2023 07:32
MySQL: convert GUID (UUID) to BINARY(16)
# MySQL: convert GUID (Microsoft-style UUID) to BINARY(16)
# '11223344-5566-7788-9900-AABBCCDDEEFF' → 0x44332211665588779900AABBCCDDEEFF
# Usage: CREATE TABLE example (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, guid BINARY(16) NOT NULL UNIQUE);
# INSERT INTO example (guid) VALUES (uuid_to_bin(UUID()));
# Tested on: MySQL 5.6, 5.7, 8.0
CREATE FUNCTION uuid_to_bin(s CHAR(36))
RETURNS binary(16)
DETERMINISTIC
RETURN UNHEX(CONCAT(
@juhaelee
juhaelee / react-typescript.md
Last active May 28, 2024 17:41
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

@cjaoude
cjaoude / chmod-tutorial.md
Last active May 7, 2024 11:58
chmod tutorial / cheat sheet / cheatsheet / for dummies

chmod
Forget the chmod octals (the numbers). Set permission the easy way using the keywords

// know the ownerships:
u = User (you)
g = Group
o = Other (aka. 'World')
a = All of the above

@octoberrust
octoberrust / WebGL-frameworks-libraries.md
Created September 19, 2019 05:24 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL frameworks and libraries

A non-exhaustive list of WebGL frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are outdated/not maintained anymore.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • Filament: Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS and WASM/WebGL
  • ClayGL: A WebGL graphic library helping you to