Skip to content

Instantly share code, notes, and snippets.

Thomas Nilefalk thoni56

Block or report user

Report or block thoni56

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
View pipe-spy.c
/***********************************************************************\
Program to spy on a stdin/stdout pipe communication between two
processes, the caller and the target.
thoni56/Thomas Nilefalk - January 2020
Make the caller call this program instead of the real target and
ensure that the TARGET variable points to the target using a full
path.
@thoni56
thoni56 / Including DAO
Created Aug 16, 2017
CiviCRM database error message for civicrm.stackexchange.com #19975
View Including DAO
CRM_Core_DAO: CONNECT: Checking for database specific ini ('') : database_ in options
CRM_Core_DAO: CONNECT: Checking for database specific ini ('') : database_ in options
CRM_Core_DAO: QUERY: SELECT id, name, value, domain_id, contact_id, is_domain, component_id, created_date, created_id
FROM civicrm_setting
WHERE (domain_id = 1) AND (is_domain = 1)
CRM_Core_DAO: FETCH: a:9:{s:2:"id";s:1:"1";s:4:"name";s:20:"contact_view_options";s:5:"value";s:30:"s:22:"12345678910";";s:9:"domain_id";s:1:"1";s:10:"contact_id";N;s:9:"is_domain";s:1:"1";s:12:"component_id";N;s:12:"created_date";s:19:"2016-02-22 03:42:39";s:10:"created_id";s:1:"3";}
CRM_Core_DAO: FETCH: a:9:{s:2:"id";s:1:"2";s:4:"name";s:20:"contact_edit_options";s:5:"value";s:48:"s:40:"12345678910111214151617";";s:9:"domain_id";s:1:"1";s:10:"contact_id";N;s:9:"is_domain";s:1:"1";s:12:"component_id";N;s:12:"created_date";s:19:"2016-02-22 03:42:39";s:10:"created_id";s:1:"3";}
CRM_Core_DAO: FETCH: a:9:{s:2:"id";s:1:"3";s:4:"name";s:23
@thoni56
thoni56 / 96.c
Last active Nov 15, 2016
Cgreen floating point mock test
View 96.c
#include <cgreen/cgreen.h>
#include <cgreen/mocks.h>
double foobar(void) {return (double)mock();}
double test_func(void)
{
return foobar();
}
Ensure(foobar_returns_floating_point_from_literal)
@thoni56
thoni56 / Game.cpp
Created May 12, 2016
Cgreen example of build failure on Darwin with AppleClang 7.3.0.7030031
View Game.cpp
#include "Game.h"
std::string Game::winner(std::string hands) {
return "";
}
You can’t perform that action at this time.