Skip to content

Instantly share code, notes, and snippets.

View ravlio's full-sized avatar

Maxim Bogdanov ravlio

  • Barcelona, Spain
View GitHub Profile
@alyssaq
alyssaq / 1. Install python3.7 & pip3.md
Last active April 11, 2023 02:13
Python3.7 setup on Mac 10.14 (Mojave)
  1. Install Python 3.7.x from https://www.python.org/downloads/ or via homebrew.
$ brew install python3   # Installed at /usr/local/Cellar/python3

Check that python3 has been installed by running it at the terminal:

$ python3
>>> Python 3.7.2
  1. Download get-pip.py from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):
@karlhorky
karlhorky / vagrant-port-forwarding.md
Last active November 16, 2017 19:24 — forked from altryne/vagrant-port-forwarding.md
Vagrant Port Forwarding on OS X Yosemite

Vagrant Port Forwarding (8080 -> 80, 8443 -> 443) with pf on OSX Mavericks/Yosemite

This guide is a fork from this gist.

Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

1. Create the anchor file

Create an anchor file under /etc/pf.anchors/com.vagrant with your redirection rule like:

rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
@OneOfOne
OneOfOne / xxhash_map_test.go
Created July 27, 2014 09:56
Go map[string] vs xxhash map[uint64]
package xxhash_map_test
import (
"bytes"
"fmt"
"testing"
"github.com/OneOfOne/xxhash"
)
@hofmannsven
hofmannsven / README.md
Last active April 19, 2024 13:17
Git CLI Cheatsheet
@jboner
jboner / latency.txt
Last active April 18, 2024 17:18
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