Skip to content

Instantly share code, notes, and snippets.

View danreeves's full-sized avatar
💀
while true {}

Dan Reeves danreeves

💀
while true {}
View GitHub Profile
<Suspense fallback={<Loader />}>
<DataComponent>
<ChildrenComponents />
</DataComponent>
</Suspense>
// DataComponent returns data ? <Loader /> : children
<DataComponent>
<ChildrenComponents />
1. Sign up for an Audiokinetic account and download the Wwise Launcher by registering for Non-commercial use here: https://www.audiokinetic.com/pricing/#non-commercial
@danreeves
danreeves / host_controlled.lua
Last active April 30, 2021 20:07
How to use SharedState
local function encode_table(tbl)
return cjson.encode(tbl)
end
local function decode_table(str)
return cjson.decode(str)
end
local shared_state_spec = {
__ __ ______ ______ __ _____
/\ \ _ \ \ /\ __ \ /\ == \ /\ \ /\ __-.
\ \ \/ ".\ \ \ \ \/\ \ \ \ __< \ \ \____ \ \ \/\ \
\ \__/".~\_\ \ \_____\ \ \_\ \_\ \ \_____\ \ \____-
\/_/ \/_/ \/_____/ \/_/ /_/ \/_____/ \/____/
__ __ ______ __ __ ______
/\ \_\ \ /\ ___\ /\ \ /\ \ /\ __ \
\ \ __ \ \ \ __\ \ \ \____ \ \ \____ \ \ \/\ \
\ \_\ \_\ \ \_____\ \ \_____\ \ \_____\ \ \_____\
\/_/\/_/ \/_____/ \/_____/ \/_____/ \/_____/
@danreeves
danreeves / kinopio-markdown-userscript.js
Last active January 3, 2021 03:29
kinopio.club markdown userscript
function kinopioExtension() {
let dataAttr = 'data-kinopio-extension-by-dnrvs'
function processCard(container, node, text) {
// Clean out old nodes
container.querySelectorAll(`[${dataAttr}]`).forEach(n => n.remove())
// Clone the real one
@danreeves
danreeves / events-to-attend.md
Created September 3, 2018 10:50
Events I want to attend
  • emf camp
  • jsconf us
  • xoxo
  • rustfest/rustconf
  • strangeloop

Place to go

Hierapolis

  • Cleopatra's Pool
  • Ploutonion

Lascaux

  • the Lascaux paintings

Uffington White Horse

@danreeves
danreeves / maybe-like-this.ts
Created April 6, 2018 12:29
Based on the example (https://palantir.github.io/tslint/develop/custom-rules/) and totally untested. Also I don't know typescript.
import * as ts from "typescript";
import * as Lint from "tslint";
export class Rule extends Lint.Rules.AbstractRule {
public static FAILURE_STRING = "Prefer keyCode to key or code";
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return this.applyWithWalker(new PreferKeyCodeWalker(sourceFile, this.getOptions()));
}
}
@danreeves
danreeves / gist:85c23e58193e1d1edc9dba0bb8485098
Created February 6, 2018 09:44
Compiling a js project with tsc
tsc -p jsconfig.json --allowJs --checkJs --outDir ~/Desktop/ts-out | grep -v 'can only be used in a .ts file'