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
@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) {
@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);
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 22, 2024 17:46 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@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