Skip to content

Instantly share code, notes, and snippets.

View jirutka's full-sized avatar
🇺🇦
Слава Україні!

Jakub Jirutka jirutka

🇺🇦
Слава Україні!
View GitHub Profile
@Th3Whit3Wolf
Th3Whit3Wolf / Arch Secure Laptop Install.md
Last active February 23, 2024 16:00
My install instruction for a secure Arch Linux (sway) laptop workstation

What's Cool

  • Encrypted root partition
    • AES-256 bit cipher
    • Argon2id variant for PBKDF
    • Sha3-512 bit hash
  • rEFInd bootloader
    • With dreary theme
    • Optimal Settings (optimized for aesthetics, and boot time)
  • Boot into backups thanks to refind-btrfs
@ivenmarquardt
ivenmarquardt / lazy-evaluation.js
Last active May 18, 2018 20:37
Lazy evaluation, lazy getters, eta reduction, function composition, implicit thunks through deferred type
// Lazy Getters
/* What enables Tail Recursion Modulo Cons in Javascript is a thunk in Weak Head Normal Form.
An expression in weak head normal form has been evaluated to the outermost data constructor,
but contains sub-expressions that may not have been fully evaluated. In Javascript only thunks
can prevent sub-expressions from being immediately evaluated. */
const cons = (head, tail) => ({head, tail});
@DrBoolean
DrBoolean / three_envs.js
Last active May 24, 2021 02:31
Tail of three envs
const compose = (f, g) => x => f(g(x))
const Id = x =>
({
fold: f => f(x),
map: f => Id(f(x))
})
Id.of = Id
const Tuple = (_1, _2) =>
@turbo
turbo / std.md
Last active March 5, 2024 05:10
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
FROM alpine:3.4
ENV RUST_VERSION 1.9.0
RUN apk add --no-cache 'curl'
# TODO: Verify download.
RUN curl -LOsS https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.gz \
&& ls -l \
&& tar -xzvf rustc-${RUST_VERSION}-src.tar.gz \
&& cd rustc-${RUST_VERSION}/ \
@japaric
japaric / build.sh
Last active May 12, 2022 14:29
rustc for x86_64-unknown-linux-musl
# Build an statically linked rustc (with host=x86_64-unknown-linux-musl)
# Last tested on: 9316ae515e2f8f3f497fb4f1559910c1eef2433d
# Usage:
# # patches must be in $(pwd)
# $ ls *.patch
# liblibc.patch rust.patch
#
@anynoomcz
anynoomcz / Stručná historie přípravy systému EET.md
Last active April 8, 2016 23:33
Jak v roce 2015 probíhala příprava implementace systému EET

Stručná historie dodávky systému EET

Plány Ministerstva financí

Během roku 2015 probíhaly nezanedbatelné aktivity v oblasti EET tak, jak je MF na počátku roku předestřelo v tiskové zprávě.

Průzkum trhu

Dle uvedeného plánu SPCSS (Státní pokladna Centrum sdílených služeb) uspořádalo průzkum trhu, který byl podkladem pro zúžení skupiny oslovených potenciálních dodavatelů, kde základním kvalifikačním předpokladem byla schopnost zpracovávat nabídku a následně dodávat systém v režimu utajených informací.

@benjchristensen
benjchristensen / sync-rest-rpc.md
Last active January 15, 2018 07:24
Regarding synchronous RESTful communication ...

Response to https://twitter.com/jeffreymaxwell/status/705760483391963136 requiring more than the 77 characters left on Twitter.

DISCLAIMER: The quality of writing and thinking here is aligned with a Twitter conversation, not a blog post, presentation, or book ;-)

Synchronous RESTful communication between Microservices is an anti-pattern ... you seem to being saying that the Netflix architecture (hystrix, eureka, ribbon, ..) is broken ... hmm what would @benjchristensen say?

@paulirish
paulirish / what-forces-layout.md
Last active March 28, 2024 11:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
l={};s=m=[];i=pc=mc=0
alias p proc
h={'>':p{mc+=1},'<':p{mc-=1},'+':p{m[mc]+=1},'-':p{m[mc]-=1},'.':p{putc m[mc]}}
j={'[':->(i){s<<i;->(){pc=l[pc-1]+1 if m[mc]==0}},']':->(i){o=s.pop;l[o]=i;p{pc=o}}}
ins=DATA.each_char.map{|c|c=:"#{c}";x=(j[c]||->(_){h[c]||p{}}).(i);i+=1;x}
while k=ins[pc];pc+=1;m[mc]||=0;k.();end
__END__
[ This program prints "Hello World!" and a newline to the screen, its
length is 106 active command characters. [It is not the shortest.]