Skip to content

Instantly share code, notes, and snippets.

View venil7's full-sized avatar
turning coffee into code

Art Deineka venil7

turning coffee into code
View GitHub Profile
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active November 17, 2024 04:56 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export to tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@venil7
venil7 / lense.ts
Last active May 24, 2020 11:08
Functional Lense implementation in TypeScript
type LGetter<LFrom, LTo> = (f: LFrom) => LTo;
type LSetter<LFrom, LTo> = (t: LTo, f: LFrom) => LFrom;
type LUpdater<T> = ((t: T) => T);
type LModifier<LFrom, LTo> = (u: LUpdater<LTo>) => (f: LFrom) => LFrom;
class Lense<LFrom, LTo> {
constructor(private get: LGetter<LFrom, LTo>, private set: LSetter<LFrom, LTo>) { }
public compose<LTo2>(inner: Lense<LTo, LTo2>): Lense<LFrom, LTo2> {
const _get: LGetter<LFrom, LTo2> = (f: LFrom) => inner.get(this.get(f));
const _set: LSetter<LFrom, LTo2> = (t2: LTo2, f: LFrom) => this.set(inner.set(t2, this.get(f)), f);
@wendreof
wendreof / build.gradle
Created September 25, 2021 16:42
7-How-to-Safely-Build-Assigned-Flutter-App-with-GitHub-Actions
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {