A complete gdb to lldb command map.
- Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
- p - Print primitive type
A complete gdb to lldb command map.
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
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 |
# Let's say you were stupid and used the postgres account for something you | |
# shouldn't have, so you have a database owned by postgres, with all objects | |
# inside owned by postgres. You regain sanity and want to transfer the | |
# ownership to an account that isn't a database superuser. | |
# | |
# In most cases, reassigning ownership is as simple as using | |
# REASSIGNED OWNED. However, that does not work if you are using the | |
# postgres account, so you have to alter the ownership manually. | |
# | |
# First, make sure you connect to the database using the postgres account. |
This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.
It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.
To see it in action, go to craigmod.com and press CMD-/
and start typing.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
gem 'stackprof', require: false | |
gem 'ruby-prof', require: false |
As configured in my dotfiles.
start new:
tmux
start new with session name: