Skip to content

Instantly share code, notes, and snippets.

Zaphod Beeblebrox ewoks

Block or report user

Report or block ewoks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ewoks
ewoks / Keeping_fork_up-to-date.md
Last active May 13, 2019 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date
View Keeping_fork_up-to-date.md

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ewoks
ewoks / build.gradle
Last active May 31, 2017
All debug variants are signed with same (custom defined) debug.key , each release variant has it's own specific {flavor}_release_keystore. No default debug.key (autogenerated from system) is used
View build.gradle
signingConfigs {
debug {
storeFile file("debug.keystore")
}
releaseBlue {
storeFile file('blue_release.keystore')
storePassword "blueblue"
keyAlias "alias_name"
keyPassword "blueblue"
@ewoks
ewoks / wrong_build.gradle
Last active May 31, 2017
Intention was that each debug & each release variant has it's own signing key (4 variants -> 4 signing keys), no signing with default key. But this doesn't work
View wrong_build.gradle
...
signingConfigs {
// debug config is intentionally deleted in favor of debugBlue & debugRed
debugBlue {
storeFile file(debugBlueKeystore)
}
debugRed {
@ewoks
ewoks / latency.markdown
Created Oct 9, 2016 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs
@ewoks
ewoks / config
Created Jun 22, 2016 — forked from donnfelker/config
Watch or Unwatch a file in git
View config
# Goes in your .git/config file
[alias]
# Temporarily stop tracking a file in git.
# usage: git unwatch path/to/file
unwatch = update-index --assume-unchanged
# Resume tracking a file in git.
# usage: git watch path/to/file
watch = update-index --no-assume-unchanged
You can’t perform that action at this time.