Skip to content

Instantly share code, notes, and snippets.

@TyIsI
TyIsI / mysql_uuid_v4.md
Last active November 29, 2023 23:01 — forked from odan/mysq_uuid_v4.md
Generating UUID v4 in MySQL

Generating UUID v4 in MySQL

SELECT
  LOWER(
    CONCAT(
      # 1th and 2nd block are made of 6 random bytes
      HEX(RANDOM_BYTES(4)),
      '-',
 HEX(RANDOM_BYTES(2)),
@TyIsI
TyIsI / README.md
Created March 1, 2023 18:42 — forked from pamolloy/README.md
Mesh network using VXLAN over Wireguard
@TyIsI
TyIsI / compose-check.py
Created May 24, 2022 07:34 — forked from laundmo/compose-check.py
Check which docker-compose services were changed since last "up" and which containers need to be restarted
#!/usr/bin/env python3
# This code is available under the MIT license: https://opensource.org/licenses/MIT
from pathlib import Path
import subprocess
import json
from dataclasses import dataclass
from typing import List, Optional
@TyIsI
TyIsI / sso_login_discourse.php
Created December 2, 2016 23:09 — forked from paxmanchris/sso_login_discourse.php
Discourse sso provider login
<?php
require('mysql.php'); // see https://gist.github.com/paxmanchris/f5d4b94f67a8acd8cefc
$me = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
$sso_secret = 'YOUR_SSO_PROVIDER_KEY_HERE';
$discourse_url = 'http://example.com';
if(!empty($_GET) and isset($_GET['sso'])){