Skip to content

Instantly share code, notes, and snippets.

View Zemnmez's full-sized avatar
💭
oof

Thomas Neil James Shadwell Zemnmez

💭
oof
View GitHub Profile
<!DOCTYPE HTML>
<title>Apple Rewards</title>
<style type="text/css">
/*
// First, we
// clear up any gives that there's
// something going on by making
// the Apple ID frame fill
// the whole page with no border
@Zemnmez
Zemnmez / gist:79c7b72c889ebc9fa6099906d0b3aaaa
Created August 1, 2023 04:38
x=[...document.querySelectorAll('[href^="/insights"]').map(v => [v.href, v.textContent]]
[
[
"https://www.theresearchagency.com/insights",
"Insights"
],
[
"https://www.theresearchagency.com/insights/how-australians-see-themselves",
"AustraliaNZAustraliaAUAustraliaINTAustraliaAUSAustraliaNZBrand & creativeResourceTRA MindSets: How do Australians see themselves? July 28, 2023"
],
[
@Zemnmez
Zemnmez / tweetdeck-limit-override-dm-rt-fix.js
Last active March 13, 2023 15:21
tweetdeck-limit-override.js
/*
This snippet is esssentially the same as being in the Twitter longer tweets test, for tweetdeck.
The Tweet length counter is fixed by tricking TweetDeck into counting up to 140 characters, twice, so you'll see 140
instead of 280 in the counter but going over 140 will give you another set of 140 charactrs.
*/
TD.services.TwitterClient.prototype.makeTwitterCall=function(b,e,f,g,c,d,h){c=c||function(){};d=d||function(){};b=this.request(b,{method:f,params:Object.assign(e,{weighted_character_count:!0}),processor:g,feedType:h});return b.addCallbacks(function(a){c(a.data)},function(a){d(a.req,"",a.msg,a.req.errors)}),b};
twttrTxt=Object.assign({},twttr.txt,{isInvalidTweet:function(){return!1},getTweetLength:function(x){return x=twttr.txt.getTweetLength.apply(this,arguments),x<140||x/140>2?x:x%140}});
@Zemnmez
Zemnmez / how.md
Last active March 7, 2023 10:12
L2TP / ipsec VPN, Amazon Linux (EC2)
# 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...
@Zemnmez
Zemnmez / authy_extract.md
Last active December 18, 2022 17:49 — 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.

Usage

  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
Zemnmez / i18n.txt
Created November 9, 2020 12:28
words in i18n style
This file has been truncated, but you can view the full file.
e21s: electroencephalograph's
A20s: Andrianampoinimerina's
c20s: counterrevolutionary's
c20s: counterrevolutionaries
e20s: electroencephalographs
e20s: electroencephalogram's
c19s: counterintelligence's
e19h: electroencephalograph
e19s: electroencephalograms
t18s: transubstantiation's
coa_title_7266={
custom=yes
pattern="pattern_solid.dds"
color1=red
color2=yellow
color3=red
colored_emblem={
color1="white"
texture="ce_letter_h.dds"
type CKValue = { toCK(): string }
abstract class NewType<T> {
constructor(public readonly value: T) {}
}
class CKNumber extends NewType<number> {
toCK() { return this.value.toString() }
}
class CKString extends NewType<string> {
import * as matrix from './matrix';
import * as vec from './vec';
function expectMatrixSimilar(actual: matrix.Matrix, expected: matrix.Matrix) {
expect(actual.length).toBe(expected.length);
actual.forEach((row, i) => {
row.forEach((v, k) => {
expect(v).toBeCloseTo(expected[i][k]);
});
});
Argument of type '(i: readonly string[]) => Errors<readonly [Error, Error]> | (readonly [() => readonly (readonly [out: "A", newIn: readonly string[]])[] | SymbolError<"A", Expected<"A">>, string[]] | readonly [() => readonly (readonly [out: "B", newIn: readonly string[]])[] | SymbolError<...>, string[]])[]' is not assignable to parameter of type '(t: readonly string[]) => Errors<readonly [Error, Error]> | readonly (readonly [out: () => readonly (readonly [out: "A", newIn: readonly string[]])[] | SymbolError<"A", Expected<"A">>, newIn: readonly string[]])[]'.
Type 'Errors<readonly [Error, Error]> | (readonly [() => readonly (readonly [out: "A", newIn: readonly string[]])[] | SymbolError<"A", Expected<"A">>, string[]] | readonly [() => readonly (readonly [out: "B", newIn: readonly string[]])[] | SymbolError<"B", Expected<...>>, string[]])[]' is not assignable to type 'Errors<readonly [Error, Error]> | readonly (readonly [out: () => readonly (readonly [out: "A", newIn: readonly string[]])[] | SymbolError<"A",