Skip to content

Instantly share code, notes, and snippets.

View drbobbeaty's full-sized avatar

Bob Beaty drbobbeaty

View GitHub Profile
@drbobbeaty
drbobbeaty / Explanation?
Created March 22, 2011 13:01
Core Dump for ZeroMQ 2.1.3 with OpenPGM (epgm)
If the core dump is right, the value of minor_bucket is 0x27c38b0 - and the check in the code is for it not being NULL. Seems to me to be next to impossible to have this be the case.
@drbobbeaty
drbobbeaty / Results
Created March 23, 2011 20:59
Test of std::map Iterator invalidation on Ubuntu 10.04.1
$ g++ maptest.cpp -o maptest
$ maptest
got :
next: 11111
$
@drbobbeaty
drbobbeaty / GDB backtrace of crash
Created April 5, 2011 15:31
Seg Fault in ZeroMQ 2.1.4 on zmq_msg_size()
(gdb) bt
#0 zmq_msg_size (msg_=0x16e53c68) at zmq.cpp:208
#1 0x00002b84d9f5de3b in zmq::encoder_t::message_ready (this=0x16e53c20) at encoder.cpp:68
#2 0x00002b84d9f65ffb in zmq::encoder_base_t<zmq::encoder_t>::get_data (this=0x16e53c00) at encoder.hpp:80
#3 zmq::pgm_sender_t::out_event (this=0x16e53c00) at pgm_sender.cpp:165
#4 0x00002b84d9f62c66 in zmq::object_t::process_command (this=0x15996360, cmd_=...) at object.cpp:63
#5 0x00002b84d9f5fafc in zmq::io_thread_t::in_event (this=<value optimized out>) at io_thread.cpp:83
#6 0x00002b84d9f5e3a2 in zmq::epoll_t::loop (this=0x237bb40) at epoll.cpp:161
#7 0x00002b84d9f73c46 in thread_routine (arg_=0x237bbb0) at thread.cpp:71
#8 0x00002b84da9f39ca in start_thread () from /lib/libpthread.so.0
@drbobbeaty
drbobbeaty / gist:1016785
Created June 9, 2011 14:03
Little Script to Start SSHAgent for SSH Logins
#!/bin/tcsh
##
# Start SSH Key Agent
##
if (`where ssh-agent` != "") then
#
# See if there's already a running copy of ssh-agent
#
set proc=`ps -aux | grep 'ssh-agent' | grep -v grep`
if ($%proc >= 10) then
@drbobbeaty
drbobbeaty / gist:1816316
Created February 13, 2012 11:59
Sparse, Banded Matrix Solution using Mac OS X cLAPACK
- (BOOL) simulateWorkspace
/*"
** This method will take the existing workspace with all the objects placed
** on it and simulate it for the potential at each simulation grid point.
** This needs to be done before you can get any values out of the workspace,
** but that's pretty obvious if you think about it.
"*/
{
BOOL error = NO;
@drbobbeaty
drbobbeaty / gist:1893270
Created February 23, 2012 15:19
UDP Multicast Listening Code
/**
* This method is the "no lock" version of the listen() method because
* sometimes it needs to be called from within a lock on the
* connections map, and we need to have something like this available.
*/
bool UDPReceiver::listen_nl( const MulticastChannel & aChannel )
{
bool error = false;
// make sure there's something logical to do...
@drbobbeaty
drbobbeaty / udp_receiver.cpp
Created May 26, 2012 15:41
DKit UDP Receiver Sample Usage
/**
* This is the tests for the udp_receiver
*/
// System Headers
#include <iostream>
#include <string>
// Third-Party Headers
// Other Headers
@drbobbeaty
drbobbeaty / caveatPatchor.js
Created September 20, 2012 14:52
Place in ~/L/AS/Propane/unsupported/ for CSS customization
var MD5 = function (string) {
function RotateLeft(lValue, iShiftBits) {
return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
}
function AddUnsigned(lX,lY) {
var lX4,lY4,lX8,lY8,lResult;
lX8 = (lX & 0x80000000);
lY8 = (lY & 0x80000000);
@drbobbeaty
drbobbeaty / unpinned_merchants.html
Created September 25, 2012 13:57
Example of creating a CSV download from Google Visualization Table
<html>
<head>
<title>Unpinned Merchants</title>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript' src='zingchart/resources/jquery.min.js'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['table']});
google.setOnLoadCallback(reload_executions);
// set up the fixed locations and paths for this metric visualization.
// we need to be able to pick the server (prod, uat, dev).
@drbobbeaty
drbobbeaty / campfire.sh
Created October 9, 2012 21:45
Bash script to send stdin to a Campfire room using curl API
#!/bin/bash
#
# This script takes stdin and sends it to the QuantumLead Campfire room as
# Canadarm. This can take an optional '-p' argument so that the stdin will
# be treated as a "paste" and go in as a fix-edwidth font paste. Otherwise,
# it'll appear as a simple proportional font "message"
#
# Let's make sure all the commands we need are accessible to us...