start new:
tmux
start new with session name:
tmux new -s myname
| /** | |
| * Returns shortest paths between all pairs using Floyd-Warshall algorithm. | |
| * Nodes are assumed to be enumerated without any holes and enumeration | |
| * starts from 0. | |
| * | |
| * @param nodes the set of vertices | |
| * @param links the map of edges with costs | |
| * @return shortest paths between all pairs, including the source and destination | |
| */ | |
| def allPairsShortestPath(nodes: Set[Int], links: Map[Int, Set[Int]]): Map[Int, Map[Int, Seq[Int]]] = { |
| postgresql: | |
| service: | |
| - running | |
| - require: | |
| - pkg: postgres_pkgs | |
| postgres_pkgs: | |
| pkg.installed: | |
| - pkgs: |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| 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 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream