Skip to content

Instantly share code, notes, and snippets.

View Temaruk's full-sized avatar

Gergely Tamás Kurucz Temaruk

  • Chemaxon
  • Budapest, Hungary
View GitHub Profile
@Temaruk
Temaruk / gist:3799541
Created September 28, 2012 12:32
Computer Graphics course, University of Szeged - Linux and OS X compatible GLUT header inclusion
/* This needs to be changed. */
#include <GL/glut.h>
/* Into the following: */
#ifdef __APPLE__
# include <GLUT/glut.h>
#else
# include <GL/glut.h>
#endif
@Temaruk
Temaruk / gist:3799013
Created September 28, 2012 10:16
Computer Graphics course, University of Szeged - Example makefile, multi-OS
# Makefile for Phigs examples
OS = $(shell uname -s)
APPS = application_name
OBJ = $(APPS).o
SRC = $(APPS).c
CFLAGS = $(C_OPTS) -I/usr/include
ifeq ($(OS), Darwin)
LIBS = -framework GLUT -framework OpenGL -framework Cocoa
@Temaruk
Temaruk / gist:3169696
Created July 24, 2012 12:33
Invalid JSON
{
"groupName": "This is a new group",
"contentType": "Events",
"OPENNodeRef": "workspace://SpacesStore/7e465fc8-470b-4410-bc15-d53d07906a68",
"CLOSENodeRef": "workspace://SpacesStore/4a981737-7e1d-4c20-98e7-f9db8d4e94d3",
}
@Temaruk
Temaruk / gist:3135996
Created July 18, 2012 12:43
Drupal Bunchball - show groups of user NML
Groups:
<nitro:request method="user.getGroups">
<span nitro_repeat="true">
<nitro:response data="userGroups.Group[%].name"></nitro:response>
</span>
</nitro:request>
@Temaruk
Temaruk / gist:2845563
Created May 31, 2012 19:16
Example JSON array
{
"propertyName": [
"propertyValue1",
"propertyValue2"
]
}
<div style="padding:3px 0px">
<asp:Label ID="lblTotalAns" runat="server" Text="0 Answers" CssClass="ansHeading" />
</div>
<div style="padding:3px 0px">
<asp:Label ID="lblTotalAns" runat="server" Text="0 Answers" CssClass="ansHeading" />
</div>
@Temaruk
Temaruk / RBTree.json
Created March 4, 2012 18:52
Red-Black Tree JSON representation
{
"key": 35,
"value": null,
"red": false,
"parent": null,
"left": {
"key": 10,
"value": null,
"red": true,
"parent": 35,
@Temaruk
Temaruk / Drupal
Created January 18, 2012 12:09
188-194 line of 'civicrm/CRM/Bridge/OG/Drupal.php'. $contactId will be null because the 'CRM_BRIDGE_OG_UTILS::contactID()' function call returns null.
static function og( &$params, $op ) {
require_once 'CRM/Bridge/OG/Utils.php';
$contactID = CRM_Bridge_OG_Utils::contactID( $params['uf_id'] );
if ( ! $contactID ) {
CRM_Core_Error::fatal( );
}
backTrace
/mnt/www/html/cavxnet/docroot/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 296
/mnt/www/html/cavxnet/docroot/sites/all/modules/civicrm/CRM/Bridge/OG/Drupal.php, fatal, 193
/mnt/www/html/cavxnet/docroot/sites/all/modules/civicrm/drupal/modules/civicrm_og_sync/civicrm_og_sync.module, og, 150
, civicrm_og_sync_og,
/mnt/www/html/cavxnet/docroot/includes/module.inc, call_user_func_array, 482
/mnt/www/html/cavxnet/docroot/profiles/drupal_commons/modules/contrib/og/og.module, module_invoke_all, 730
/mnt/www/html/cavxnet/docroot/profiles/drupal_commons/modules/contrib/og/og.module, og_save_subscription, 856
/mnt/www/html/cavxnet/docroot/profiles/drupal_commons/modules/contrib/og/og.module, og_subscribe_user, 1987