Skip to content

Instantly share code, notes, and snippets.

View AlphaHot's full-sized avatar
🎯
Focusing

AlphaHot

🎯
Focusing
  • // TODO
  • Canada
View GitHub Profile
@Ustice
Ustice / Boolean Algebra for Programmers in a Nutshell.md
Last active January 9, 2024 20:16
Boolean Algebra in a nutshell for JS/TS programmers

Boolean Algebra in a nutshell for JS/TS programmers

There are a lot of strategies that you will hear about in the Javascript community for keeping your conditionals from becoming a tangled mess. This isn't like them. This is someting different. MATH! Boolean Algebra to be exact. I use it all the time to simplify complex conditionals. There are two things that you need to know: de Morgan's Theorem, and Karnaugh (pronounced CAR-no) Maps. (Don't worry, there is no test)

de Morgan's Theorem

De Morgan's Theorem is great distributing nots (!), and for when you want to convert an && to an ||, or back. This is it:

 !(A && B) = !A || !B

Обращение к российским IT-специалистам

Коллеги! Армия Путина вторглась в Украину под предлогом «денацификации» и ведёт там грязную войну. У многих из нас есть коллеги из Украины, с которыми можно пообщаться и убедиться в том, что никакого «освобождения» от Путина им не нужно.

Многим из нас сейчас страшно. Но открытое письмо нашей индустрии против этой войны собрало уже более 30 000 подписей. Нас много, и мы уверены, что это не предел.

Правительству тоже страшно: страшно потерять нас. А значит, действия каждого из нас могут помочь прекратить это безумие.

Что делать

@tylermorganwall
tylermorganwall / submarine_cable_map.R
Last active April 19, 2024 07:36
Submarine Cable Map Dataviz
library(geojsonsf)
library(sf)
library(rayrender)
#Data source: https://github.com/telegeography/www.submarinecablemap.com
cables = geojson_sf("cable-geo.json")
cablescene = list()
counter = 1
for(i in 1:length(cables$geometry)) {
@darconeous
darconeous / tesla-key-card-protocol.md
Last active April 5, 2024 07:09
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active April 25, 2024 17:28
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.