start new:
tmux
start new with session name:
tmux new -s myname
| 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 |
| -- 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%' |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| import scala.concurrent.{ExecutionContext, Future} | |
| import spray.routing.{AuthenticationFailedRejection, RequestContext} | |
| import spray.routing.authentication.{Authentication, ContextAuthenticator} | |
| /** Token based authentication for Spray Routing. | |
| * | |
| * Extracts an API key from the header or querystring and authenticates requests. | |
| * | |
| * TokenAuthenticator[T] takes arguments for the named header/query string containing the API key and | |
| * an authenticator that returns an Option[T]. If None is returned from the authenticator, the request |
| import UIKit | |
| /// Wrapper for the NSNotification userInfo values associated with a keyboard notification. | |
| /// | |
| /// It provides properties that retrieve userInfo dictionary values with these keys: | |
| /// | |
| /// - UIKeyboardFrameBeginUserInfoKey | |
| /// - UIKeyboardFrameEndUserInfoKey | |
| /// - UIKeyboardAnimationDurationUserInfoKey | |
| /// - UIKeyboardAnimationCurveUserInfoKey |
Many people have asked me about using the G1 garbage collector with Cassandra. Since most of my customers are running 2.0 in production the test is with 2.0 for now. Once I script it up I'll re-run the numbers with 2.1.
I also need to re-test with Java 7 and the Oracle JDKs.
It is loaded by default by /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist.
If you run
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
| -------------------------------------------------------------------------- | |
| # ofed_info -s | |
| -------------------------------------------------------------------------- | |
| Find Mellanox Adapter Type and Firmware/Driver version | |
| ConnectX-4 card | |
| # lspci | grep Mellanox | |
| 0a:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3] | |
| # lspci -vv -s 0a:00.0 | grep "Part number" -A 3 | |
| # lspci | grep Mellanox | awk '{print $1}' | xargs -i -r mstvpd {} |
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;