Skip to content

Instantly share code, notes, and snippets.

View TeamDman's full-sized avatar
🌜
o/

TeamDman

🌜
o/
View GitHub Profile
@bennydictor
bennydictor / BrainFuckMethodHandleCompiler.java
Created April 25, 2019 12:13
BrainFuck interpreter/jit compiler using java's MethodHandle
package org.bennydict.brainmethodfuckhandles;
import java.io.*;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.util.HashMap;
import java.util.Scanner;
public class BrainFuckMethodHandleCompiler {
@unitycoder
unitycoder / 0-win10-live-stream-server.txt
Last active April 16, 2022 11:26
Setting up Live Video Stream Server on Windows 10 (RTPM + HLS + OBS)
from http://zqdevres.qiniucdn.com/data/20170907091103/index.html
- download ngingx with RTPM module http://nginx-win.ecsds.eu/download/ *nginx 1.7.12.1 Lizard.zip
- unzip
- create start.bat script
@echo off
title Start Stream
cd /d "C:\nginx"
start nginx
exit
@HuemanInstrument
HuemanInstrument / gist:bc6f4715e36765136e0293d5513182a8
Created June 15, 2022 05:44
Untitled Track Boards of Canada Video
Notebook used: https://colab.research.google.com/github/Sxela/DiscoDiffusion-Warp/blob/main/Disco_Diffusion_v5_2_Warp.ipynb
Please follow my content here: https://linktr.ee/huemaninstrument
https://noclip.website/ <-- FFX Gaudosalam footage video init
Done on a V100 card
Settings:
steps:
@Faheetah
Faheetah / Dockerfile
Last active October 19, 2022 15:22
Docker patterns/anti-patterns
### Generic Dockerfile demonstrating good practices
### Imports
# Bad-ish, we do not need Ubuntu for this, nor do we want latest if we are using in a build system, predictable is better
FROM ubuntu:latest
# Better, using a small image since our app has no dependency on Ubuntu
FROM alpine:3.3
@neilpeterson
neilpeterson / init-backend-results.md
Last active November 17, 2022 21:13
Initializing Terraform Backend

When initalizing a Terraform backend, a .terraform/terraform.tfstate file is written to disk and can include storage account secrets.

Option 1

Include the Azure Storage key in the Terraform configuration.

Not ideal: the Storage access key is exposed both in the configuration and in the .terraform/terraform.tfstate file.

Configuration:

@Gydo194
Gydo194 / Server.cpp
Last active July 7, 2023 16:39
C++ Event driven TCP socket server (multi client, single threaded)
/*
* Server.cpp
*
* EventServer is a simple C++ TCP socket server implementation,
* to serve as an example to anyone who wants to learn it.
* It can interface with the rest of your program using three callback functions.
* - onConnect, which fires when a new client connects. the client's fd is passed.
* - onDisconnect, which fires when a client disconnects. passes fd.
* - onInput, fires when input is received from a client. passes fd and char*
*
@Shadows-of-Fire
Shadows-of-Fire / strike.md
Last active July 12, 2023 20:41
Triage Stike Demands

Forge Triage Union Strike Demands

Code of Conduct

Context

In repeated instances, recently on May 28th[^1], and even more recently on June 22nd[^11][^12][^13] Lex acts as if he is above the Code of Conduct[^14].image
Unfortunately, the idea is sustained by the fact that the CoC currently has the famous "Lex Clause" which allows Lex to do whatever he wants when interacting with the community and the team. This is an extremely pressing issue, as his behaviour is becoming more concerning every day, and he still is the face of Forge.

Demands

  1. The aforementioned clause will be removed in totality. There will be absolutely no exceptions made for any member of the team or the community regarding beha
@Banashek
Banashek / prettmaps-fablepy.fs
Created July 21, 2022 19:42
Quick and dirty fable-py prettymaps. Very dynamic for proof of concept.
open Fable.Core
open Fable.Core.PyInterop
open Fable.Python.Json
[<ImportAll("sys")>]
let sys: obj = nativeOnly
let prettymaps: obj = importAll "prettymaps"
let matplotlib: obj = importAll "matplotlib"
@wwerner
wwerner / Dockerfile
Last active December 22, 2023 10:48
Enable heroku ps:exec in docker containers
FROM openjdk:8-jdk-alpine
VOLUME /tmp
# see https://devcenter.heroku.com/articles/exec#enabling-docker-support
RUN apk add --no-cache curl bash openssh python
ADD src/main/docker/heroku-exec.sh /app/.profile.d/heroku-exec.sh
RUN chmod a+x /app/.profile.d/heroku-exec.sh
ADD src/main/docker/sh-wrapper.sh /bin/sh-wrapper.sh
RUN chmod a+x /bin/sh-wrapper.sh
@rparrett
rparrett / repeat.rs
Last active January 11, 2024 22:29
Bevy 0.12 2d Repeating Image
use bevy::{
prelude::*,
render::{
mesh::VertexAttributeValues,
texture::{ImageAddressMode, ImageLoaderSettings, ImageSampler, ImageSamplerDescriptor},
},
sprite::MaterialMesh2dBundle,
};
fn main() {