Skip to content

Instantly share code, notes, and snippets.

@WebRTCGame
WebRTCGame / Memoize.js
Last active August 16, 2019 20:06
Javascript Multiple Argument Memoization
console.clear();
function mem2() {
let iset = {};
return (fn) => {
return (...args) => {
!(args in iset) && (iset[args] = fn(...args));
return iset[args];
}
}
@WebRTCGame
WebRTCGame / Basic custom function.EXCEL.yaml
Last active July 22, 2019 22:35
Calculates the volume of a sphere.
name: Basic custom function
description: Calculates the volume of a sphere.
host: EXCEL
api_set: {}
script:
content: |
/**
* Calculates the volume of a sphere.
* @customfunction
* @param {number} radius
@WebRTCGame
WebRTCGame / wordfindreplaceexcel.vba
Created November 13, 2019 17:15
Microsoft Word VBA Find And Replace from Excel file
'excel file should have two columns, left being the find, right being the replace
'the find items should read like: [xxxx]
Sub ReplaceByExcel()
Dim xl As Object
Dim wb As Object
Dim ws As Object
Dim rng As Object
Dim cl As Object
Set xl = CreateObject("Excel.Application")
@WebRTCGame
WebRTCGame / index.html
Last active December 31, 2019 07:21
testplayground
<div>hi</div>
import * as winston from 'winston';
import * as WebSocket from 'ws';
import Config from './config';
import Database from './database';
import GameEngine from './gameengine';
import {
ErrorCode,
EventType,
IBonus,
IEvent,