Skip to content

Instantly share code, notes, and snippets.

View lambda-mike's full-sized avatar

Michał Grygierzec lambda-mike

View GitHub Profile
@lambda-mike
lambda-mike / git.md
Last active August 11, 2022 13:26
Git snippets

Git

log

# find all commits which modify any 'package.json' file on 'dev' branch in remote 'origin' since yesterday
git log origin/dev --since='yesterday' --name-only -- "*/package.json"
@lambda-mike
lambda-mike / sc.ts
Created January 4, 2022 23:33
Schedule example
import * as SC from "@effect-ts/core/Effect/Schedule"
import { pipe } from "@effect-ts/core/Function"
const app1 = pipe(
T.fail("app1"),
T.retry(pipe(
//SC.exponential(1000, 2)["&&"](SC.recurs(4))["|>"](SC.jittered_),
SC.exponential(1000, 2)["&&"](SC.recurs(4)),
SC.onDecision((d) => {
@lambda-mike
lambda-mike / array_of_errors.ts
Created November 17, 2021 20:23
Accumulate errors in array, keep results in record
import { pipe } from "@effect-ts/system/Function"
import { makeAssociative } from "@effect-ts/core/Associative"
import * as R from "@effect-ts/core/Collections/Immutable/Dictionary"
import * as E from "@effect-ts/core/Either"
test("example 04", () => {
const ValidationApplicative = E.getValidationApplicative(
makeAssociative<Array<string>>((l, r) => [...l, ...r])
@lambda-mike
lambda-mike / code_reviews.md
Last active January 13, 2021 14:42
Code Reviews

Remote Work

Communication

Asynchronous communication

  • Be crystal clear on what they’re asking for (if anything)
  • Pre-answer any likely follow-up questions
  • Include any details, files, or assets the recipients might need

Org-mode

Basics

  • M-x org-mode enable Org mode
  • * MyHeader create header
  • TAB hide/show text below the header
  • S-TAB cycle through visibility levels
  • C-RET create another header on the same level

Doom Emacs

Top

  • SPC q q quit
  • SPC SPC find file in project
  • SPC . find file (slower)
  • SPC , open a workspace buffer
  • SPC f p edit private config files
  • SPC f r recently visited files
@lambda-mike
lambda-mike / 12_factor_apps.md
Last active August 14, 2020 17:52
12 Factor apps - my notes

12 Factor Apps

12 Factor Apps

I. Codebase

Multiple apps sharing the same code is a violation of twelve-factor. The solution here is to factor shared code into libraries which can be included through the dependency manager.

II. Dependencies

Rust

Cargo

cargo new --bin myproj

cargo new --lib mylib

cargo build --release

@lambda-mike
lambda-mike / Nu_cheatsheet.md
Last active February 9, 2024 16:10
Nu shell cheatsheet