Skip to content

Instantly share code, notes, and snippets.

@omorandi
omorandi / README.md
Last active December 10, 2015 22:18 — forked from 0thernet/README.md

Drag from an existing node to add a new node or link. Click to select/deselect nodes/links. Hit the DELETE key to remove the selected node or link. Drag to pan. Scroll to zoom.

Built with D3.js.

@omorandi
omorandi / gist:6209130
Created August 12, 2013 08:37
Tracing JSC calls with dtrace
sudo dtrace -n 'JavaScriptCore*:::profile-will_execute{ trace(arg0); trace(copyinstr(arg1)); trace(copyinstr(arg2)); trace(arg3) }' -n 'JavaScriptCore*:::profile-did_execute{ trace(arg0); trace(copyinstr(arg1)); trace(copyinstr(arg2)); trace(arg3) }'
arg0: profileGroup (int)
arg1: function (string)
arg2: file-url (string)
arg3: line (int)
@omorandi
omorandi / gist:6241406
Last active February 23, 2018 10:29
Add third party jni library to Android Titanium Module
From: http://developer.appcelerator.com/question/121573/how-do-i-use-so-library-in-module
Place .so files in mymodule/lib/armeabi
Add this to build.xml:
<target name="post.jar">
<copy todir="${libs}">
<fileset dir="lib">
<include name="**/*.so"/>
@omorandi
omorandi / android_get_view_size.java
Last active December 14, 2020 20:51
Android: get the actual size of a match_parent/wrap_content view
view.post(new Runnable() {
@Override
public void run() {
int width = view.getWidth();
int height = view.getHeight();
//do something cool with width and height
}
});