Skip to content

Instantly share code, notes, and snippets.

@tomkail
tomkail / ExtendedScriptableObjectDrawer.cs
Last active May 16, 2024 01:54
Displays the fields of a ScriptableObject in the inspector
// Developed by Tom Kail at Inkle
// Released under the MIT Licence as held at https://opensource.org/licenses/MIT
// Must be placed within a folder named "Editor"
using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
// ==UserScript==
// @name RohBot Color Randomizer
// @version 0.1
// @description try to take over the world!
// @author Rohansi
// @match https://rohbot.net/
// @grant GM_addStyle
// @require https://raw.githubusercontent.com/garycourt/murmurhash-js/0197ce38bedac0e05f40b9d7152095d06db8292c/murmurhash3_gc.js
// ==/UserScript==
// ==UserScript==
// @name RohBot FILTERED
// @version 0.5
// @description enter something useful
// @author Rohansi
// @match https://rohbot.net/
// @grant none
// ==/UserScript==
var storageKey = "filtered-patterns2";
@Wunkolo
Wunkolo / compact.cpp
Last active May 5, 2024 20:21
Ascii Raymarcher(old)
#include <math.h>
#include <algorithm>
#include <string>
#include <immintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const
@a1k0n
a1k0n / ylogo.c
Created October 22, 2015 01:02
Expanded version of the code featured in http://www.a1k0n.net/2011/06/26/obfuscated-c-yahoo-logo.html
#include <math.h>
#include <stdio.h>
#include <unistd.h>
// Each character encodes an angle of a plane we are checking
const char plane_angles[] = "O:85!fI,wfO8!yZfO8!f*hXK3&fO;:O;#hP;\"i[";
// and these encode an offset from the origin s.t. (x, y) dot (cos(a), sin(a)) < offset
const char plane_offsets[] = "<[\\]O=IKNAL;KNRbF8EbGEROQ@BSXXtG!#t3!^";
// this table encodes the offsets within the above tables of each polygon