Skip to content

Instantly share code, notes, and snippets.

View ddoronin's full-sized avatar
🏠
In The Matrix

Dima Doronin ddoronin

🏠
In The Matrix
View GitHub Profile
@tpae
tpae / minHeap.js
Last active April 8, 2024 14:14
JavaScript implementation of Min Heap Data Structure
// Implement a min heap:
// -> insert, extract_min
// property:
// - elements are in ascending order
// - complete binary tree (node is smaller than it’s children)
// - root is the most minimum
// - insert takes O(logn) time
// - insert to the bottom right
@ddoronin
ddoronin / gist:61e9bfea1d62b0052403
Last active August 29, 2015 14:23
Require Light
(function(global) {
var serviceRegistrar = {};
function resolve(serviceName) {
if (typeof serviceRegistrar[serviceName] === 'undefined') {
throw new Error('Service "' + serviceName + '" cannot be instantiated.');
}
return serviceRegistrar[serviceName];
}
@ryanchang
ryanchang / lldb_cheat_sheet.md
Last active June 21, 2024 16:23
LLDB Cheat Sheet

LLDB Cheat Sheet

A complete gdb to lldb command map.

Print out

  • Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
  • p - Print primitive type