Skip to content

Instantly share code, notes, and snippets.

View M3TIOR's full-sized avatar
😵‍💫
Trying to finish something

Ruby Allison Rose M3TIOR

😵‍💫
Trying to finish something
  • Vancouver WA, USA
View GitHub Profile
@M3TIOR
M3TIOR / docker-compose.log
Created November 29, 2022 04:39
Watching my unprotected Passbolt AWS instance get automatically bot pwned in real-time.
ubuntu@ip-172-31-8-125:~/passbolt_docker-3.7.4$ sudo docker compose -f docker-compose/docker-compose-dev.yaml up
[+] Running 2/0
⠿ Container docker-compose-db-1 Created 0.0s
⠿ Container docker-compose-passbolt-1 Recreated 0.1s
Attaching to docker-compose-db-1, docker-compose-passbolt-1
docker-compose-db-1 | 2022-11-29 03:53:21+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.3.37+maria~ubu2004 started.
docker-compose-db-1 | 2022-11-29 03:53:21+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
docker-compose-db-1 | 2022-11-29 03:53:21+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.3.37+maria~ubu2004 started.
docker-compose-db-1 | 2022-11-29 03:53:21+00
@M3TIOR
M3TIOR / memtest2bcd.py
Created September 3, 2022 01:01
A tool to crawl the log of Memtest86 v9.4 and convert the list of bad RAM locations into a Windows BCD compatable badmemory sector list.
#!/usr/bin/env python
# NOTE: Supports Python v3.10+
# @author Ruby Allison Rose
# SPDX-License-Identifier: MIT
from argparse import ArgumentParser
from pathlib import Path
import re
datetime_re = r"(?P<datetime>\d{4}-\d\d-\d\d \d\d:\d\d:\d\d|)"
@M3TIOR
M3TIOR / m3tior.clang-format
Last active March 7, 2022 01:33
My personal Clang-Format v13+ configuration
# @use clang-format>=13.0.0
# @copyright - (C) 2021 Ruby Allison Rose
# SPDX-License-Identifier: MIT
# Language C or C++ is handle by the same entry
Language: Cpp
# For more information on styling options see the following link:
# https://releases.llvm.org/13.0.0/tools/clang/docs/ClangFormatStyleOptions.html
@M3TIOR
M3TIOR / cypher.php
Created January 16, 2022 23:27
A cypher for generating secure passwords from a drawn pattern. Uses full ASCII encoding due to Luks limitations. Makes re-keying easy and simplifies complex passwords.
<?php
$chars="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~!@#$%^&*()_+{}|:\"<>?`-=[]\\;',./`";
$gridsize=16;
$gridcount=($gridsize+1)**2;
while (strlen($chars) <= $gridcount) $chars=$chars.chr(rand(32,126));
for ($l=5; $l > 0; $l--) $chars=str_shuffle($chars);
// TODO: maybe implement row and column single click secions with the following?
// I could just do it using Javascript but raw HTML is better.
// https://stackoverflow.com/questions/35738049/select-only-a-single-column-in-a-html-table
@M3TIOR
M3TIOR / steamcmd
Created October 8, 2021 03:12
A shell script to install and update `steamcmd` on the Raspberry Pi
#!/bin/sh -x
# NOTE: This should be placed in the user home directory since it's file name
# conflicts with the file names of steamcmd's internal binary and
# scripts.
#
################################################################################
# Copyright 2018 Ruby Allison Rose (AKA: M3TIOR)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@M3TIOR
M3TIOR / trigger-port.py
Last active October 13, 2021 01:55
A utility for bypassing Xfinity Router anti-consumer bullshit. Port Forwarding throught Port Triggering.
#!/usr/bin/env python3
# NOTE: recommended python 3.8
################################################################################
# Copyright (c) 2021 Ruby Allison Rose (AKA: m3tior)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
@M3TIOR
M3TIOR / wipe.sh
Created August 6, 2021 22:20
A utility like `shred` for cleaning disks completely. NOTE: shouldn't be used on SSDs or Flash memory.
#!/bin/sh
###############################################################################
# Copyright (C) Ruby Allison Rose (m3tior)
# This project is licensed under the MIT license. For more information, refer to
# OSS licenses.
################################################################################
## Globals (Comprehensive)
# Symlink script resolution via coreutils (exists on 95+% of linux systems.)
@M3TIOR
M3TIOR / testMobileMethodTypes.js
Created February 9, 2021 02:20
Tests whether bind or lambda is faster for moving method references.
#!/usr/bin/env node
// Tests whether bind or lambda is faster for moving method references.
// turns out bind is faster on my end. It's a micro-optimization. But still
// interresting to know.
class Container {
nop(){ }
}
const con = new Container();
@M3TIOR
M3TIOR / rangeSpeedTest.js
Created February 9, 2021 01:59
Tests Javascript Range implementations I've found online and written myself.
#!/usr/bin/env node
// Tests Javascript Range implementations I've found online and written myself.
// This is a speed test. Feel free to exit early after the second test suite is done.
// The sealed function takes hours on my laptop to finish. Sealing arrays really
// screws with performance apparently. Good to know for the future.
//
// Smaller code does not always mean faster.
console.time("generator-range");
console.time("generator-range_setup");
@M3TIOR
M3TIOR / garbage.js
Created July 11, 2020 20:08
A really inefficient way of getting all the debs for a specific package from a specific architechture. @Debian
"use-strict";
async function getDocument(url){
await new Promise((resolve, reject)=>{
const fetch = new XMLHttpRequest();
fetch.open("GET", url);
fetch.responseType = "document";
fetch.onload = function(){