Skip to content

Instantly share code, notes, and snippets.

@rsouth
rsouth / build-qt-static-with-msvc.md
Last active August 10, 2024 23:08
Build a static version of Qt 5.15.0 with MSVC 2019.
" root markers used to locate project
if !exists('g:projectile#marker')
let g:projectile#marker = '.svn,.git,.projectile'
endif
" returns nearest parent directory contains one of the markers
function! projectile#find_root(name)
let name = fnamemodify((a:name != '')? a:name : bufname(), ':p')
let finding = ''
" iterate all markers
@skywind3000
skywind3000 / vinegar.vim
Last active March 21, 2018 14:15
vinegar fork to support dirvish / nerdtree / netrw
"======================================================================
"
" vinegar.vim - Vinegar & Oil (fork from tpope/vim-vinegar)
"
" Created by skywind on 2017/06/30
" Last Modified: 2018/03/16 22:33
"
" Split windows and the project drawer go together like oil and
" vinegar. I don't mean to say that you can combine them to create a
" delicious salad dressing. I mean that they don't mix well!
@darrenjs
darrenjs / ssl_server_nonblock.c
Last active November 9, 2024 14:26
OpenSSL example using memory BIO with non-blocking socket IO
/*
This file had now been added to the git repo
https://github.com/darrenjs/openssl_examples
... which also includes a non blocking client example.
-------------------------------------------------------------------------------
ssl_server_nonblock.c -- Copyright 2017 Darren Smith -- MIT license
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 28, 2024 20:39
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jboner
jboner / latency.txt
Last active November 28, 2024 17:49
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