Skip to content

Instantly share code, notes, and snippets.

Simon Bobrov smnbbrv

  • Munich
Block or report user

Report or block smnbbrv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
smnbbrv / memoize.decorator.ts
Last active Feb 7, 2020
Memoize decorator based on WeakMaps (respects non-primitive arguments by reference)
View memoize.decorator.ts
const globalCache = new WeakMap();
export function Memoize() {
return (target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>) => {
if (descriptor.value != null) {
descriptor.value = getNewFunction(descriptor.value);
} else if (descriptor.get != null) {
descriptor.get = getNewFunction(descriptor.get);
} else {
throw new Error('Only put a Memoize decorator on a method or get accessor.');
smnbbrv /
Created Feb 5, 2019
Open Gitlab page
open $(git config remote.origin.url | sed -E 's/[^:]+:\/\/([^@]*@){0,1}([^:\/]+)([:0-9]*)(\/.+)\.git/https:\/\/\2\4/')
smnbbrv /
Last active Nov 23, 2018
Download Google font using google-webfonts-helper. Use within the target directory
# see for licensing
curl -o ",latin-ext&variants=regular,700" \
&& unzip \
&& rm
You can’t perform that action at this time.