Skip to content

Instantly share code, notes, and snippets.

Bram Stolk stolk

Block or report user

Report or block stolk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stolk
stolk / mkicons.py
Created Jun 13, 2018
Script to create Android icons from an SVG file.
View mkicons.py
#!/usr/bin/python
import sys
import os
sizes = [
('xxxhdpi', 192),
('xxhdpi', 144),
('xhdpi', 96),
('hdpi', 72),
@stolk
stolk / gist:92763561972b427c529baeb1a92fe788
Last active Apr 7, 2018
An OPENSL-ES error as a string.
View gist:92763561972b427c529baeb1a92fe788
static const char* sl_error_str( SLresult result )
{
switch( result )
{
case SL_RESULT_SUCCESS: return "success";
case SL_RESULT_PRECONDITIONS_VIOLATED: return "preconditions violated";
case SL_RESULT_PARAMETER_INVALID: return "parameter invalid";
case SL_RESULT_MEMORY_FAILURE: return "memory failure";
case SL_RESULT_RESOURCE_ERROR: return "resource error";
case SL_RESULT_RESOURCE_LOST: return "resource lost";
@stolk
stolk / gist:3666b2b4d4319764fdff4a2d4c619782
Created Nov 4, 2017
Perf record runs with wildly different output sizes.
View gist:3666b2b4d4319764fdff4a2d4c619782
bram@ubuntu64:~/apps/BloxTrace$ /usr/bin/perf record --freq 2000 --call-graph dwarf ./bench segment
Loaded 455 primitives.
Testing ray against 455 primitives.
[ perf record: Woken up 289 times to write data ]
[nvidia] with build id d9b6653c0d39e1618ccd50318de6da8df74820a1 not found, continuing without symbols
[ perf record: Captured and wrote 72.134 MB perf.data (8979 samples) ]
bram@ubuntu64:~/apps/BloxTrace$ /usr/bin/perf evlist -v
cycles:pp: size: 112, { sample_period, sample_freq }: 2000, sample_type: IP|TID|TIME|CALLCHAIN|PERIOD|REGS_USER|STACK_USER, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 2, sample_id_all: 1, exclude_guest: 1, exclude_callchain_user: 1, mmap2: 1, comm_exec: 1, sample_regs_user: 0xff0fff, sample_stack_user: 8192
You can’t perform that action at this time.