Skip to content

Instantly share code, notes, and snippets.

View dgryski's full-sized avatar
🏠
💻 🍞 ☕

Damian Gryski dgryski

🏠
💻 🍞 ☕
View GitHub Profile
@jboner
jboner / latency.txt
Last active May 10, 2025 11:02
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
@whostolebenfrog
whostolebenfrog / pres.md
Created March 7, 2013 10:20
Notes on: Instantly better presentations - Damian Conway

Instantly better presentations - Damian Conway

It probably just makes more sense to just view his version online at:

http://damian.conway.org/IBP.pdf

But making notes is useful anyway.

7 tips are

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 5, 2025 13:05
A badass list of frontend development resources I collected over time.
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 21, 2025 15:01
Backend Architectures Keywords and References
@mattetti
mattetti / multipart_upload.go
Last active March 22, 2025 23:09
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@dustin
dustin / progress.go
Last active December 19, 2015 16:18
Uploading a ton of stuff to S3, I decided I wanted something that would take this boring *os.File and give me a progress indicator. Here's the thing I threw together. Sends this sort of thing to stdout ('\r'ing over itself every second): 10MB/72MB (14.6%)
package main
import (
"fmt"
"io"
"os"
"time"
"github.com/dustin/go-humanize"
)
@guelfey
guelfey / cover.vim
Created August 16, 2013 22:01
Vim plugin for Go test coverage profiles
" cover.vim - Vim plugin for Go test coverage profiles
" install in ftplugin/go
"
" ":Cover coverprofile" will open the current file in a new read-only window,
" highlighting the code regarding to whether it is covered by tests or not.
" You can change the colors by highlighting goTestCovered and goTestNotCovered
" from your vimrc.
if exists("b:did_ftplugin_go_cover")
finish
@rgs
rgs / gist:7370406
Created November 8, 2013 12:32
A vim status line item to display git branch name and status of the currently edited file. To be put in the ~/.vimrc.
" returns a string <branch/XX> where XX corresponds to the git status
" (for example "<master/ M>")
function CurrentGitStatus()
let gitoutput = split(system('git status --porcelain -b '.shellescape(expand('%')).' 2>/dev/null'),'\n')
if len(gitoutput) > 0
let b:gitstatus = strpart(get(gitoutput,0,''),3) . '/' . strpart(get(gitoutput,1,' '),0,2)
else
let b:gitstatus = ''
endif
endfunc
@lauris
lauris / github-vim.js
Created December 13, 2013 11:44
Github Vim
ace.require("ace/lib/net").loadScript("https://raw.github.com/ajaxorg/ace-builds/master/src-min-noconflict/keybinding-vim.js", function() {
e = document.getElementById("ace-editor").env.editor;
e.setKeyboardHandler(ace.require("ace/keyboard/vim").handler);
})