Skip to content

Instantly share code, notes, and snippets.

@jboner
jboner / latency.txt
Last active November 19, 2024 14:58
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@nire0510
nire0510 / latest_queries.sql
Last active March 27, 2018 10:19
[Last Executions] Get the last executed queries for a specific database #database #ms-sql
SELECT deqs.last_execution_time AS [Time],
dest.text AS [Query], dest.*
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
WHERE dest.dbid = DB_ID('DB_NAME')
ORDER BY deqs.last_execution_time DESC
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 19, 2024 11:04
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@nicolasdao
nicolasdao / open_source_licenses.md
Last active November 18, 2024 07:46
What you need to know to choose an open source license.
@cristian-aldea
cristian-aldea / slick-terminal.md
Last active October 22, 2024 19:17
Ubuntu + Zsh + Oh My Zsh + Powerlevel10k = Sliiiiiiiiiiiiick

Based on: https://gist.github.com/kevin-smets/8568070

This gist outlines the steps needed to setup zsh, ohmyzsh and the powerlevel10k theme on Ubuntu, available for anyone to follow.

  1. Setup required dependencies

    # update packages
    sudo apt update