This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nav.models.rrd import RrdDataSource | |
datasources = RrdDataSource.objects.filter(rrd_file__key='interface').select_related('rrd_file') | |
datasource_loookup = {} | |
for data in datasources: | |
interface = int(data.rrd_file.value) | |
if interface in datasource_loookup: | |
datasource_loookup[interface].append(data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Wed Jun 20 12:06:38 2012] [DEBUG] [pid=23146 nav.web.netmapdev.views] netmap:test_traffic_foo() start | |
[Wed Jun 20 12:06:38 2012] [DEBUG] [pid=23146 nav.web.netmapdev.common] build_netmap_layer2_graph() start | |
[Wed Jun 20 12:06:39 2012] [DEBUG] [pid=23146 nav.web.netmapdev.common] build_netmap_layer2_graph() topology graph done | |
[Wed Jun 20 12:06:39 2012] [DEBUG] [pid=23146 nav.web.netmapdev.common] build_netmap_layer2_graph() graph copy with metadata done | |
[Wed Jun 20 12:06:39 2012] [DEBUG] [pid=23146 nav.web.netmapdev.common] build_netmap_layer2_graph() view positions and graph done | |
[Wed Jun 20 12:06:39 2012] [DEBUG] [pid=23146 nav.web.netmapdev.views] netmap:test_traffic_foo() graph done | |
[Wed Jun 20 12:06:39 2012] [DEBUG] [pid=23146 nav.web.netmapdev.views] netmap:test_traffic_foo() base convert done | |
[Wed Jun 20 12:06:39 2012] [DEBUG] [pid=23146 nav.web.netmapdev.views] netmap:test_traffic_foo() edges done - starting RRD | |
[Wed Jun 20 12:06:39 2012] [DEBUG] [pid=23146 nav.web.netmapdev.common] netmap:attach_rrd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
foo="-iname '*.flv' , -iname '*.webm'" | |
bar () { | |
find $1 -type f \( $foo \) | while read filename; do | |
echo $filename | |
done; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _get_datasource_lookup(graph): | |
edges_iter = graph.edges_iter(data=True) | |
interfaces = set() | |
for _, _, w in edges_iter: | |
w = w['metadata'] | |
if 'uplink' in w: | |
if w['uplink']['thiss']['interface']: | |
interfaces.add(w['uplink']['thiss']['interface'].pk) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
die () { | |
echo "$1" >&2 | |
exit 1 | |
} | |
print_usage_and_die () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) bt | |
#0 0xffffe424 in __kernel_vsyscall () | |
#1 0xb7d73781 in raise () from /lib/i686/cmov/libc.so.6 | |
#2 0xb7d76bb2 in abort () from /lib/i686/cmov/libc.so.6 | |
#3 0x0809cd44 in weechat_shutdown (return_code=1, crash=1) at /usr/local/src/weechat/src/core/weechat.c:427 | |
#4 0x080b9be0 in debug_sigsegv () at /usr/local/src/weechat/src/core/wee-debug.c:168 | |
#5 <signal handler called> | |
#6 0xb7d895d3 in vfprintf () from /lib/i686/cmov/libc.so.6 | |
#7 0xb7da9240 in vsnprintf () from /lib/i686/cmov/libc.so.6 | |
#8 0xb7d902c2 in snprintf () from /lib/i686/cmov/libc.so.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Core was generated by `weechat-curses -a --dir /home/rockj/.weechat --upgrade'. | |
Program terminated with signal 6, Aborted. | |
#0 0xffffe424 in __kernel_vsyscall () | |
(gdb) bt | |
#0 0xffffe424 in __kernel_vsyscall () | |
#1 0xb7d4a781 in raise () from /lib/i686/cmov/libc.so.6 | |
#2 0xb7d4dbb2 in abort () from /lib/i686/cmov/libc.so.6 | |
#3 0x0809cd44 in weechat_shutdown (return_code=1, crash=1) at /usr/local/src/weechat/src/core/weechat.c:427 | |
#4 0x080b9be0 in debug_sigsegv () at /usr/local/src/weechat/src/core/wee-debug.c:168 | |
#5 <signal handler called> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) bt full | |
#0 0xffffe424 in __kernel_vsyscall () | |
No symbol table info available. | |
#1 0xb7d4a781 in raise () from /lib/i686/cmov/libc.so.6 | |
No symbol table info available. | |
#2 0xb7d4dbb2 in abort () from /lib/i686/cmov/libc.so.6 | |
No symbol table info available. | |
#3 0x0809cd44 in weechat_shutdown (return_code=1, crash=1) at /usr/local/src/weechat/src/core/weechat.c:427 | |
No locals. | |
#4 0x080b9be0 in debug_sigsegv () at /usr/local/src/weechat/src/core/wee-debug.c:168 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
07-20 22:07:33.835: ERROR/AndroidRuntime(8037): FATAL EXCEPTION: main | |
java.lang.NumberFormatException: Invalid int: "Ro" | |
at java.lang.Integer.invalidInt(Integer.java:138) | |
at java.lang.Integer.parse(Integer.java:375) | |
at java.lang.Integer.parseInt(Integer.java:366) | |
at java.lang.Integer.parseInt(Integer.java:332) | |
at com.ubergeek42.weechat.Color.getWeechatColor(Color.java:187) | |
at com.ubergeek42.weechat.Color.getColor(Color.java:211) | |
at com.ubergeek42.weechat.Color.getFormatString(Color.java:255) | |
at com.ubergeek42.weechat.Color.parseColors(Color.java:354) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Demo D3.JS zoom scale translate thingie |