The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: October 8th 2015
- Original post
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 |
# Sweet branch and commit mappings | |
git config --global alias.map "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all" |
perl -pi -e 's/\r\n|\n|\r/\r\n/g' file-to-convert # Convert to DOS | |
perl -pi -e 's/\r\n|\n|\r/\n/g' file-to-convert # Convert to UNIX |
# Prompt | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
# Terminal colors | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
# ls | |
alias ls="ls -lGAFh" |
/* | |
* Service for UsbHost Communication with an Arduino Due | |
*/ | |
import java.util.Arrays; | |
import android.annotation.SuppressLint; | |
import android.app.Service; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; |
package com.nathansizemore; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.client.methods.HttpPost; | |
import org.apache.http.entity.StringEntity; | |
import org.apache.http.impl.client.HttpClientBuilder; | |
import org.apache.http.message.BasicHeader; | |
import org.apache.http.protocol.HTTP; |