Skip to content

Instantly share code, notes, and snippets.

View maxjustus's full-sized avatar

Max Justus Spransy maxjustus

  • People With Jetpacks
  • Los Angeles, CA
View GitHub Profile
@christoofar
christoofar / main.md
Last active May 14, 2024 04:16
Wrapping a C library call in a defensive Go routine
This study focuses on the strategies used by the "xz backdoor", an extremely
complex piece of malware that contains its own x64 disassembler inside of it 
to find critical locations in your code and hijacks it by swapping out your 
code with its own as it runs.  Because this a machine-code based attack,
all code written in any program language can be attacked and is vulnerable.

Instead of targeting sshd directly, the xz 
backdoor injects itself in the parent systemd process then hijacks the 
GNU Dynamic Linker (ld), before sshd is even started or libcrypto.so is 
@veekaybee
veekaybee / normcore-llm.md
Last active May 29, 2024 20:41
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

@StevenTCramer
StevenTCramer / Dotnet_Background_Jobs
Last active May 7, 2024 11:48
If you are queuing background jobs/work items today in your .NET applications, how are you doing it and what are you using it for?
David Fowler 🇧🇧🇺🇸💉💉💉 on Twitter: "If you are queuing background jobs/work items today in your .NET applications, how are you doing it and what are you using it for? #dotnet #aspnetcore" / Twitter
https://twitter.com/davidfowl/status/1442566223099666436
Background tasks with hosted services in ASP.NET Core | Microsoft Docs
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-6.0&tabs=visual-studio
Messaging that just works — RabbitMQ
https://www.rabbitmq.com/
.NET/C# Client API Guide — RabbitMQ
@tuxedocat
tuxedocat / lima_docker_rootless.yaml
Last active February 21, 2023 17:07
lima-vm setting: Rootless docker with both TCP/UNIX Socket connection (I personally use this setting for buildpacks)
# Example to use Docker instead of containerd & nerdctl
# $ limactl start ./lima_docker_rootless.yaml
# $ limactl shell lima_docker_rootless docker run -it -v $HOME:$HOME --rm alpine
# To run `docker` on the host (assumes docker-cli is installed):
# $ export DOCKER_HOST=unix://$HOME/docker.sock
# $ docker ...
# This example requires Lima v0.7.3 or later
# CPUs: if you see performance issues, try limiting cpus to 1.
@sbailliez
sbailliez / vagrant-vmware-tech-preview-apple-m1-pro.md
Last active April 10, 2024 07:51
Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

UPDATE November 20, 2022: VMWare Fusion 13

VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.

Summary

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated

@joseluisq
joseluisq / main.rs
Created February 10, 2021 22:23 — forked from lu4nm3/main.rs
Tokio Async: Concurrent vs Parallel
use futures::StreamExt;
use std::error::Error;
use tokio;
use tokio::macros::support::Pin;
use tokio::prelude::*;
use tokio::time::{Duration, Instant};
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut multi_threaded_runtime = tokio::runtime::Builder::new()
.threaded_scheduler()
@ivormetcalf
ivormetcalf / upload_stream.rs
Last active April 25, 2024 20:28
Rust Module to upload a stream to Amazon S3.
use rusoto_core::ByteStream;
use rusoto_s3::{S3Client, S3};
use futures::{future, stream, Stream, StreamExt, TryStreamExt};
pub async fn upload_stream(
client: S3Client,
bucket: String,
key: String,
data_stream: impl Stream<Item = String>,
@0x1b-xyz
0x1b-xyz / eap_proxy-udmpro-health.sh
Last active August 20, 2021 22:25
A script that manages the lifecycle of the eap_proxy-udmpro container on a UDM PRO between reboots or firmware updates. See https://github.com/pbrah/eap_proxy-udmpro for the upstream image.
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
TARGET_HOST="${TARGET_HOST:?"You must define TARGET_HOST"}"
PASSWORD_FILE="${PASSWORD_FILE:?"You must define PASSWORD_FILE"}"
EAP_PROXY_IMAGE="${EAP_PROXY_IMAGE:-"pbrah/eap_proxy-udmpro:v1.1"}"
HC_CONTAINER_NAME="eap_proxy-healthcheck"
UDM_CONTAINER_NAME="eap_proxy-udmpro"
@WebReflection
WebReflection / custom-elements-pattern.md
Last active May 17, 2024 23:30
Handy Custom Elements' Patterns

Handy Custom Elements' Patterns

Ricardo Gomez Angel Photo by Ricardo Gomez Angel on Unsplash

This gist is a collection of common patterns I've personally used here and there with Custom Elements.

These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.