Skip to content

Instantly share code, notes, and snippets.

View briancw's full-sized avatar

Brian Whicheloe briancw

View GitHub Profile
@briancw
briancw / Totally Normal JS.js
Created March 21, 2024 07:01
New JS syntax
const foo = "bar"
"This function does stuff"
const complicatedFunction = (input) => {
"Obviously it doesn't, but just pretend it does for the sake of example"
console.log(input)
}
complicatedFunction(foo)
@briancw
briancw / tilingsprite.ts
Last active December 7, 2023 23:40
PixiJS chunked world with TilingSprite
import * as PIXI from 'pixi.js'
import Stats from 'stats.js'
const canvasElement = document.getElementById('watvas')
const renderer = await PIXI.autoDetectRenderer({
width: window.innerWidth,
height: window.innerHeight,
canvas: canvasElement,
})
@briancw
briancw / wat.ts
Created November 21, 2023 19:37
Deno Webview
import {Webview} from 'https://deno.land/x/webview/mod.ts'
const html = `
<html>
<body>
<h1><marquee>WAT</marquee></h1>
</body>
</html>
`
@briancw
briancw / docker-compose.yml
Created August 9, 2023 03:01
Dockerized FRP
services:
frp:
image: fatedier/frpc:v0.49.0
container_name: frpc
volumes:
- ./frpc.ini:/frpc.ini
command: ['-c', '/frpc.ini']
# extra_hosts:
# - "host.docker.internal:host-gateway"
restart: unless-stopped
@briancw
briancw / string-array.js
Created January 19, 2023 03:04
String Typed Array
const StringArray = new Proxy(Uint8Array, {
construct(target, args) {
const arr = new Uint8Array(args[0] * args[1])
arr.encoder = new TextEncoder()
arr.decoder = new TextDecoder()
arr.charLength = args[1]
return new Proxy(arr, {
get(target, property, reciever) {
if (property !== 'encoder' && property !== 'decoder' && property !== 'charLength') {
const crypto = require('crypto')
const algorithm = 'aes-256-ctr'
/**
* Encrypt a message using an encryptionKey
* @function encrypt
* @param {String} message The data to be encrypted
* @param {Buffer} encryptionKey A 256 byte (32 character) encryptionKey
* @return {String} The encrypted data
*/
Homemaker - Expanded Settlements
Configurable Power Armor Fusion Core Drain
Alternate Settlements - v1.2 - Alternate Settlements
Longer Headlamp Light
Settlement Supplies Expanded 2.5 - Safe SSEx - Safe SSEx
Simple Intersection - Simple Intersection - Update .61
Settlement Keywords Expanded v1.36
True Storms - Wasteland Edition (Thunder-Rain-Weather Redone) - True Storms - Wasteland Edition 1.2
Companion Infinite Ammo - Companion Infinite Ammo - SINGLE
Immersive Fast Travel
const crypto = require('crypto')
const owasp = require('owasp-password-strength-test')
owasp.config({
allowPassphrases: true,
maxLength: 128,
minLength: 16,
minPhraseLength: 24,
minOptionalTestsToPass: 4,
})