Skip to content

Instantly share code, notes, and snippets.

View onlineth's full-sized avatar
:shipit:

Thomas Hein onlineth

:shipit:
  • Illinois, United States
View GitHub Profile
@onlineth
onlineth / gist:154c0aed039479a1f079238c1c37a706
Created January 11, 2021 23:37 — forked from jamesgmarks/gist:56502e46e29a9576b0f5afea3a0f595c
MySQL/MariaDB BIN_TO_UUID and UUID_TO_BIN Polyfill
DELIMITER //
CREATE FUNCTION BIN_TO_UUID(b BINARY(16))
RETURNS CHAR(36)
BEGIN
DECLARE hexStr CHAR(32);
SET hexStr = HEX(b);
RETURN LOWER(CONCAT(
SUBSTR(hexStr, 1, 8), '-',
SUBSTR(hexStr, 9, 4), '-',
#!/bin/bash
# Setup and enable auditd
# MUST REBOOT AFTER SETUP
#
# FUNCTIONALITIES:
#
# * Auditing user TTY
# aureport --tty
#
# * Auditing root commands (real uid)
@onlineth
onlineth / gzip_str.py
Created June 3, 2020 17:52 — forked from Garrett-R/gzip_str.py
Demo of how to gzip and gunzip a string in Python 3
import gzip
import io
def gzip_str(string_):
out = io.BytesIO()
with gzip.GzipFile(fileobj=out, mode='w') as fo:
fo.write(string_.encode())
bytes_obj = out.getvalue()
@onlineth
onlineth / kerberos4windows.md
Last active July 1, 2019 16:28
Kerberos on Windows for Putty

Kerberos on Windows for Putty

Uninstall Putty and Kerberos First

If you've tried to already, remove any MIT Kerberos instances you've installed already. If you've installed the 64-bit version of Putty, uninstall that as well. You may have to reboot your computer, do that before proceeding with this guide.

Install Putty

@onlineth
onlineth / Using Github Deploy Key.md
Last active January 10, 2019 22:24 — forked from zhujunsan/Using Github Deploy Key.md
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key

Keybase proof

I hereby claim:

  • I am onlineth on github.
  • I am online (https://keybase.io/online) on keybase.
  • I have a public key whose fingerprint is 8FEE 7FA5 2E46 51ED CFA8 8115 72C2 1297 F59B 32A6

To claim this, I am signing this object: