$ ssh -A vm
$ git config --global url."[email protected]:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "[email protected]:"]
insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ios standalone web app --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- ios status bar appearance, options: black, black-translucent --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<!-- ios icon, just one size because ios will scale it, remove "-precomposed" if you want ios to add effects --> | |
<link href="[email protected]" sizes="144x144" rel="apple-touch-icon-precomposed"> | |
<!-- ios startup images --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers | |
-------------------------- | |
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 | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# For more info see https://golang.org/doc/install.html, the instructions there are all | |
# that is needed to install Go. | |
# | |
# DO NOT RUN with sudo; Go should be installed under the user not root. Using sudo will | |
# cause problems. | |
set -euo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Functions from Go's strings package usable as template actions | |
// with text/template. | |
// | |
// This approach assumes you have some context type as a receiver, | |
// but if you just need the functions check out the FuncMap variant | |
// below. | |
// | |
// Commented functions are not deemed useful in template actions. | |
// Haven't actually used this, but this is one possible way of doing it. | |
// Another option is to fill a FuncMap with most of the strings package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#ifdef _MSC_VER | |
#include <intrin.h> /* for rdtscp and clflush */ | |
#pragma optimize("gt",on) | |
#else | |
#include <x86intrin.h> /* for rdtscp and clflush */ | |
#endif |