Skip to content

Instantly share code, notes, and snippets.

/**
* Render CyberBrokers
* Using the on-chain Broker renderer
**/
// Change these variables as you see fit
const WEB3_PROVIDER_URL = "http://0.0.0.0:8545";
const TOKEN_ID = 0;
const SVG_SAVE_FILE_NAME = `${__dirname}/CyberBroker_${TOKEN_ID}.svg`;
@bensadeghi
bensadeghi / fractals.ipynb
Last active August 29, 2015 14:16
Examples of iterations of complex-valued functions in Julia
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bensadeghi
bensadeghi / cat-proc-cpuinfo
Created September 23, 2013 01:01
cat /proc/cpuinfo
~ $ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz
stepping : 3
microcode : 0x12
cpu MHz : 800.000
cache size : 6144 KB
@bensadeghi
bensadeghi / uncomment_verifyFunction
Created August 30, 2013 02:16
uncommented verifyFunction() in src/codegen.cpp recompiled via $ make -C deps cleanall; make debug ran $ gdb -x ../contrib/debug_bootstrap.gdb ran $ strace ../usr/bin/julia-debug-readline -bf sysimg.jl
~/temp/julia/base $ gdb -x ../contrib/debug_bootstrap.gdb
GNU gdb (GDB) Fedora (7.6-34.fc19)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
@bensadeghi
bensadeghi / gist:6374241
Created August 29, 2013 04:21
gdb -x ../contrib/debug_bootstrap.gdb (make -C deps cleanall; make debug)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
osutils.jl
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0759b1d in ?? ()
#0 0x00007ffff0759b1d in ?? ()
#1 0x00007ffffffb2cd0 in ?? ()
#2 0x376d158b6ba7b400 in ?? ()
#3 0x00007ffffffb2cd0 in ?? ()
@bensadeghi
bensadeghi / strace_release-readline_sysimg
Created August 29, 2013 04:13
strace ../usr/bin/julia-release-readline -bf sysimg.jl (of a fresh clone)
~/temp/julia/base $ strace ../usr/bin/julia-release-readline -bf sysimg.jl
execve("../usr/bin/julia-release-readline", ["../usr/bin/julia-release-readlin"..., "-bf", "sysimg.jl"], [/* 42 vars */]) = 0
brk(0) = 0xa6a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb3cf717000
readlink("/proc/self/exe", "/home/bs/temp/julia/usr/bin/juli"..., 4096) = 50
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/home/bs/temp/julia/usr/bin/../lib/julia/tls/x86_64/libncurses.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/bs/temp/julia/usr/bin/../lib/julia/tls/x86_64", 0x7fff35af1420) = -1 ENOENT (No such file or directory)
open("/home/bs/temp/julia/usr/bin/../lib/julia/tls/libncurses.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/bs/temp/julia/usr/bin/../lib/julia/tls", 0x7fff35af1420) = -1 ENOENT (No such file or directory)
@bensadeghi
bensadeghi / gdb_backtrace_sysimg_fc19
Created August 29, 2013 01:20
GDB backtrace for Segfault during bootstrap (sysimg.jl) on Fedora19 64-bit
Using Julia version 5d9b434fb973bae7aaa39d1b159963b00a962597 (Wed Aug 28 20:38:33 2013 -0400)
GBD backtrace output:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
osutils.jl
Program received signal SIGSEGV, Segmentation fault.
@bensadeghi
bensadeghi / sin_frac.py
Created August 24, 2013 08:52
a quick python gist for generating fractals using compositions of sin() and another function
from PyQt4.QtGui import QApplication
from pylab import *
ion()
ny = 600
r = 1.25
nx = ny*r
iters = 10
grid = pi*2/3