Skip to content

Instantly share code, notes, and snippets.

View Xunnamius's full-sized avatar
🐕

Bernard Xunnamius

🐕
View GitHub Profile
@Xunnamius
Xunnamius / uncirc_recirc.js
Created May 6, 2020 16:56
Circular JSON Implementation: `uncirc` and `recirc` for stringifying/parsing circular objects in JavaScript
// Takes an object and replaces the circular references (including deep circular references) with strings
var uncirc = function(obj, ident, seen)
{
seen = seen || {};
// Push the object identity (key) and object (value) onto the "seen" list
seen[ident] = obj;
// Returns the ident of a value or null if we have not yet seen it
// Could have made this an anonymous function
@Xunnamius
Xunnamius / blitz.sh
Last active May 6, 2020 16:55
Blitz, the dirty server stress tester
#!/bin/bash
# A little program to quickly stress test a server
# blitz <url> <# of requests> <method>
# <url> defaults to localhost
# <# of requests> defaults to 30
# <method> defaults to POST
# Probably a good idea to type method names with capital letters
@Xunnamius
Xunnamius / DIGEST_FORWARDING.sql
Last active May 6, 2020 16:55
Epic SQL: DIGEST_FORWARDING (used in my Postfix instances)
DROP FUNCTION DIGEST_FORWARDING;
DELIMITER //
CREATE FUNCTION DIGEST_FORWARDING (s VARCHAR(80))
RETURNS TEXT
DETERMINISTIC
LANGUAGE SQL
CONTAINS SQL
SQL SECURITY INVOKER
@Xunnamius
Xunnamius / workaround.md
Created May 6, 2020 16:52
WSL2 External Host (LAN) Access Workaround

Step 1: netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=3000 connectaddress=localhost connectport=3000
Step 2: Add Allow local routing to ports 3000-4000 rule to Windows Firewall's inbound connection ruleset

@Xunnamius
Xunnamius / gist:81e7dc01a6ec525156c6f7f2929d89ee
Created May 6, 2020 16:29
(Q3 2019) Tracking the progress on the various use case scenarios we come up with for SwitchCrypt

Use Cases

Intra-file Variable Security Regions (VSR)

[StrongBox UC flag: uc_secure_regions]

Communicating classified materials, grand jury testimony, national secrets, etc. require the highest level of discretion when handled, yet sensitive information like this often appears within a (much) larger amount of data that we care less about in context.

@Xunnamius
Xunnamius / cloudSettings
Last active March 22, 2023 01:27
[LINUX] Visual Studio Code Settings Sync Gist
{"lastUpload":"2023-02-12T14:30:28.930Z","extensionVersion":"v3.4.3"}