Skip to content

Instantly share code, notes, and snippets.

View kg's full-sized avatar

Katelyn Gadd kg

View GitHub Profile
#include <stdint.h>
#define gint32 int32_t
#define guint32 uint32_t
#define guint64 uint64_t
#define guint8 uint8_t
typedef guint8 v128_u1 __attribute__ ((vector_size (16)));
typedef gint32 v128_i4 __attribute__ ((vector_size (16)));
source_filename = "/app/example.cpp"
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20"
target triple = "wasm32-unknown-emscripten"
%struct.DoubleBox = type { double }
%struct.UlongBox = type { i64 }
@__main_void = hidden alias i32 (), ptr @main
define hidden void @AcceptDouble(DoubleBox)(double %0) #0 !dbg !6 {
@kg
kg / MetaProject.csproj
Created April 3, 2022 10:43
Automatically compile game scripts as part of visual studio build
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<ProjectGuid>{29214583-65ED-44D0-8DC6-F57539C6BC8E}</ProjectGuid>
<OutputType>Library</OutputType>
<AssemblyName>HeavenLens.Scripts</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>latest</LangVersion>
@kg
kg / text.txt
Created September 30, 2021 17:31
Deathloop spoilery Q&A + theories
Deathloop spoilers ahead (mostly earlier-game stuff in this section)
* Why do only Cole and Julianna remember?
Cole and Julianna aren't the only ones who remember. 2-Bit also
remembers, and he's made out of part of Charlie's brain. So why
doesn't Charlie remember? Wenjie's lab has at least one note where
she explicitly calls out that Cole and Julianna remember the loops
@kg
kg / userContent.css
Last active May 25, 2021 21:43
Funimation userstyle to make its web player not awful
@-moz-document domain("www.funimation.com")
{
div.ribbon, section.header-promo-ribbon-wrap {
display: none !important;
}
main#main-content {
padding: 0px !important;
}
@kg
kg / gist:a1fbdd2a68c76d85bebcbc8be98b4609
Created January 29, 2021 16:46
Current bindings benchmark timings
| Method | Mean | Error | StdDev | Median | Min | Max | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---------------------------------------------------------- |-------------:|------------:|------------:|-------------:|-------------:|-------------:|--------:|------:|------:|----------:|
| CallMethod_Void | 6,500.488 us | 128.9937 us | 132.4670 us | 6,421.108 us | 6,386.649 us | 6,794.649 us | - | - | - | 2 B |
| CallMethod_Sum | 6,825.421 us | 46.6149 us | 41.3229 us | 6,832.778 us | 6,737.056 us | 6,900.194 us | - | - | - | 16,018 B |
| CallMethod_ConcatString | 8,885.143 us | 67.5927 us | 59.9192 us | 8,890.518 us | 8,783.607 us | 8,991.107 us | - | - | - | 96,043 B |
| CallMethod_ReturnString | 8,345.665 us | 66.346
1> FNA3D.vcxproj -> E:\Documents\Projects\FNA3D\visualc\..\..\FNALibs\x64\FNA3D.dll
Target RunNativeCodeAnalysis:
e:\documents\projects\fna3d\mojoshader\mojoshader.c(474): warning C6255: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead.
e:\documents\projects\fna3d\mojoshader\mojoshader.c(2763): warning C6246: Local declaration of 'len' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '2571' of 'e:\documents\projects\fna3d\mojoshader\mojoshader.c'.
e:\documents\projects\fna3d\mojoshader\mojoshader.c(3462): warning C6011: Dereferencing NULL pointer 'retval->output'.
e:\documents\projects\fna3d\mojoshader\mojoshader.c(3473): warning C6011: Dereferencing NULL pointer 'binary'. See line 3462 for an earlier location where this can occur
e:\documents\projects\fna3d\mojoshader\mojoshader.c(3589): warning C6246: Local declaration of 'usage' hides declaration of the same name in outer scope. For a
// 0(45) : error C7011: implicit cast from "float" to "int"
#version 120
uniform vec4 vs_uniforms_vec4[12];
uniform float vpFlip;
const vec4 vs_c12 = vec4(0.5, 0.159154935, 0.25, 6.283185478);
const vec4 vs_c13 = vec4(-3.141592739, -0.000000252, 0.00002476, -0.001388839);
const vec4 vs_c14 = vec4(0.041666641, 1.0, 0.0, 0.0);
vec4 vs_r0;
vec4 vs_r1;
@if [%6]==[] goto error
@goto ok
:error
@echo USAGE: video2gif START_TIME DURATION WIDTH FRAME_RATE (DITHER_OPTIONS) (CROP_RECTANGLE width:height:x:y) (EQ_OPTIONS) INPUT OUTPUT
@goto end
:ok
@set PALETTE="%TEMP%\palette.png"
function (a) {
var _window = this, g2 = '', g3 = 0, g5 = {}, stringJoin = function () {
return a.makeArray(arguments).join('');
};
g5.contentType = 'application/json', g5.dataType = 'json', g5.type = 'POST';
var f5 = function (a, b, c, d) {
var f3 = function () {
d() ? f6(a) : (a !== 4001 && (b += c), g4(2, b));
};
g4(f3, b);