Skip to content

Instantly share code, notes, and snippets.

View mrjoshuak's full-sized avatar
💭
I may be slow to respond.

Joshua Kolden mrjoshuak

💭
I may be slow to respond.
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active June 29, 2024 17:53
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active May 28, 2024 17:40
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@reformstudios
reformstudios / gist:993286b82f5e70b43013a3cd5f223c45
Created June 5, 2018 12:52
Create VES Camera Report Schema in Shotgun
'''
Usage :
Setup a new custom entity type in SG to hold the VES camera schema. Assign this value to the VES_ENTITY_NAME variable.
Set the 'preview' variable to False if you want to execute the schema update.
WARNING : This script will update your Shotgun Database schema. Use it at your own risk. I accept no liability if you experience any data loss.
'''
import sgtk
sg=tk.shotgun
@ahmetb
ahmetb / gcpauth.go
Created May 22, 2018 17:21
Authenticating to GKE cluster with client-go, IAM service account and a Google auth plugin written from scratch
package main
import (
"context"
"fmt"
"log"
"net/http"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
@mrjoshuak
mrjoshuak / Poetics.md
Created December 29, 2016 04:14
Poetics by Aristotle

Poetics

By Aristotle

Translated by S. H. Butcher


SECTION 1

Part I

@mrjoshuak
mrjoshuak / c4_formal.md
Last active November 24, 2016 23:56
C4 Normative description, and Psudocode

Normative Language

C4 Base 58

C4 Base 58 shall be a positional numeral system with a radix (base) of 58 and shall represent integer values 0 through 57, inclusive, using the case-sensitive characters "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" in that order from the Latin set 1 as defined by ISO/IEC 8859-1. (These are the characters for the numerals 1-9, followed by the upper-case letters A-Z, followed by the lower-case letters a-z, excluding the characters “0” zero, “O” upper-case oh, “I” upper-case, and “l” lower-case el.)

@declank
declank / go-play-music.go
Created June 10, 2015 22:19
[Golang] Simple music player that uses ffmpeg and portaudio
package main
import (
"code.google.com/p/portaudio-go/portaudio"
"encoding/binary"
"log"
"io"
"os"
"os/exec"
)
@hraban
hraban / pre-commit.md
Last active April 18, 2024 06:46
Prevent accidentally committing debug code in Git
@cryptix
cryptix / client.go
Created June 22, 2014 11:09
multipart upload with io.Pipe
package main
import (
"io"
"log"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"runtime"
require 'rubygems'
require 'openssl'
require 'digest/md5'
key = OpenSSL::PKey::RSA.new(2048)
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
puts "Spoof must be in DER format and saved as root.cer"
raw = File.read "root.cer"
cert = OpenSSL::X509::Certificate.new raw
cert.version = 2