I hereby claim:
- I am cjbischoff on github.
- I am cjbischoff (https://keybase.io/cjbischoff) on keybase.
- I have a public key whose fingerprint is CAB9 85E6 B9DF FCD2 F6B3 5031 97AE 5EB0 797D 6731
To claim this, I am signing this object:
| #!/bin/bash | |
| # License: Public Domain. | |
| # Author: Joseph Wecker, 2012 | |
| # | |
| # -- DEPRICATED -- | |
| # This gist is slow and is missing .bashrc_once | |
| # Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch | |
| # (Thanks gioele) | |
| # | |
| # Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile? |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| if [ `which brew | grep 'brew$'` = "" ]; then | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
| fi | |
| if [ ! -e ~/.zshrc_local -o `grep '\$(brew --prefix coreutils)/libexec/gnubin' ~/.zshrc_local` = "" ]; then | |
| echo 'export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"' >> ~/.zshrc_local | |
| fi |
| #!/bin/bash | |
| # | |
| # Installs and upgrades OS X tools and command-line utils using [Homebrew] (www.brew.sh). | |
| # This will use GNU's available toolset. | |
| # | |
| # # # | |
| # Function to install homebrew [ http://brew.sh ] | |
| # # # | |
| install_brew() { |
| 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 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 |
Picking the right architecture = Picking the right battles + Managing trade-offs
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
| 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 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 |
| /var/folders/4s/l39wbkz55tx10gb1lfdvj6th0000gn/T/python-build.20181120064129.76625 ~ | |
| 11/20 06:41:31 [[1;32mNOTICE[0m] Downloading 1 item(s) | |
| 11/20 06:41:31 [[1;32mNOTICE[0m] Allocating disk space. Use --file-allocation=none to disable it. See --file-allocation option in man page for more details. | |
| [#3fb641 6.1MiB/16MiB(37%) CN:1 DL:7.0MiB ETA:1s] | |
| [#3fb641 13MiB/16MiB(80%) CN:1 DL:7.0MiB] | |
| 11/20 06:41:34 [[1;32mNOTICE[0m] Download complete: /private/var/folders/4s/l39wbkz55tx10gb1lfdvj6th0000gn/T/python-build.20181120064129.76625/Python-3.6.7.tar.xz |
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |