Skip to content

Instantly share code, notes, and snippets.

<?php
function civicrm_timetracker_views_data() {
$data['civicrm_case'] = array(
'table' => array(
'group' => 'CiviCRM Case',
'title' => 'civicrm_case',
'join' => array(
<?php
function civicrm_timetracker_views_data() {
$data['civicrm_case'] = array(
'table' => array(
'group' => 'CiviCRM Case',
'title' => 'civicrm_case',
'join' => array(
<?php
function civicrm_timetracker_views_data() {
$data['civicrm_case'] = array(
'table' => array(
'group' => 'CiviCRM Case',
'title' => 'civicrm_case',
'join' => array(
<?php
/*
/*this demonstrates the usage of chained api functions. A variety of return formats are used. Note that no notes
*custom fields or memberships exist
*/
function contact_get_example(){
$params = array(
<?php
/*
/*this demonstrates the usage of chained api functions. A variety of return formats are used. Note that no notes
*custom fields or memberships exist
*/
function contact_get_example(){
$params = array(
<?php
/**
* File for the CiviCRM APIv3 API wrapper
*
* @package CiviCRM_APIv3
* @subpackage API
*
* @copyright CiviCRM LLC (c) 2004-2011
* @version $Id: api.php 30486 2010-11-02 16:12:09Z shot $
<?php
/**
* File for the CiviCRM APIv3 API wrapper
*
* @package CiviCRM_APIv3
* @subpackage API
*
* @copyright CiviCRM LLC (c) 2004-2011
* @version $Id: api.php 30486 2010-11-02 16:12:09Z shot $
var ldap = require('ldapjs');
//var argv = require('optimist').argv;
//console.log('(%d,%d)', argv.x, argv.y);
var settings = require('./settings');
//console.log(settings);
var request = require('request');
var server = ldap.createServer();
@tttp
tttp / gist:3274660
Created August 6, 2012 14:04
Nodejitsu not ok
With 0.6
info: Creating snapshot 0.0.1-5
info: Updating app civibot
info: Activating snapshot 0.0.1-5 for civibot
info: Starting app civibot
error: Error running command deploy
error: socket hang up
error: Error: socket hang up
error: at createHangUpError (http.js:1253:15)
@tttp
tttp / gist:4054310
Created November 11, 2012 09:40
socket.io
<script>
var socket = io.connect('http://localhost');
socket.on('bot', function (data) {
var id = data.id || "result";
var reply = data.text || data;
if (data.id) {
$('#'+id).append("<div class='alert alert-success'>"+reply+"</div>");
$("#cmd").val("");
} else
$('#result').prepend("<div class='alert alert-success'>"+reply+"</div>");