Skip to content

Instantly share code, notes, and snippets.

View maud3l's full-sized avatar

Mauro De Lillo maud3l

  • Barcelona
View GitHub Profile
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@henfiber
henfiber / KB-Buying-guide-EU.md
Last active July 19, 2024 12:24
Buying keyboards and keyboard components from EU

Europe

  • SkinFlint : Price comparison site which has some nice filtering options per switch type etc. Searches for offers in UK, Germany, Poland and Austria
  • mykeyboard.eu : Keyboards, keycaps and accessories. Based in Belgium.
  • candykeys.com : European Store selling Vortex, Leopold, KBP, Anne Pro keyboards, keycap sets and components (ISO + ANSI). Based in Germany, ships to EU.
  • falba.tech : custom wooden bamboo cases, and some acrylic and carbon ones. Switch packs (65 browns at 48EUR). Other parts for the GH60, Atreus, ErgoDox. Also Microcontrollers, diodes, leds etc.
  • 42keebs.eu - Mostly PCBs, tools and accessories. Located in Czech Republic.
  • KEYGEM : Switches, Keycaps, lubes, cables, DIY kits and deskmats. Based in Germany, ships to the EU and worldwide.
  • [Eloquent Clicks - Custom Mechanical Keyboard Store](https://www.eloquen
@edolstra
edolstra / nix-lang.md
Last active July 16, 2024 02:12
Nix language changes

This document contains some ideas for additions to the Nix language.

Motivation

The Nix package manager, Nixpkgs and NixOS currently have several problems:

  • Poor discoverability of package options. Package functions have function arguments like enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@mattitanskane
mattitanskane / hidedock.md
Last active May 22, 2024 17:15
How to hide the Dock on MacOS

I never use the Dock and all it does for me is come in the way when I'm resizing windows or clicking on stuff I can't access using just my keyboard.

Here's a way to hide the Dock so it doesn't get in the way anymore.

Run the following commands in the terminal.

# Hide Dock
defaults write com.apple.dock autohide -bool true && killall Dock
defaults write com.apple.dock autohide-delay -float 1000 && killall Dock
@mueslimak3r
mueslimak3r / jellyfin-caddy-fail2ban-auth
Last active March 6, 2024 19:25
caddy jellyfin fail2ban authentication ban
**caddy config for jellyfin:**
jellyfin.mydomain.com {
reverse_proxy http://192.168.0.1212:2121
log {
output file /var/log/caddy/JellyfinProxy.log {
roll_size 2MiB # Set max size 5 MB
roll_local_time true # Use localhost time
roll_keep 4 # Keep at most 2 log files
@masihtehrani
masihtehrani / config.lua
Last active January 17, 2024 09:54
lunarvim golang python lvim neovim nvim ide ~/.config/lvim/config.lua
--[[
lvim is the global options object
Linters should be
filled in as strings with either
a global executable or a path to
an executable
]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- general