Skip to content

Instantly share code, notes, and snippets.

@humbletim
humbletim / basecrm_create_lead.php
Created August 24, 2017 13:58 — forked from iaintshine/basecrm_create_lead.php
Create a new lead using php 5.3 and Base API v2
<?php
function createLead($accessToken, array $lead)
{
$method = 'post';
$absUrl = 'https://api.getbase.com/v2/leads';
$headers = array(
'User-Agent: BaseCRM/PHP Sample',
'Authorization: Bearer ' . $accessToken,
'Accept: application/json',
@humbletim
humbletim / car.js
Created February 7, 2017 03:42 — forked from anonymous/car.js
Node circular dependencies example
var gas = require('./gas');
var speed = 0;
exports.drive = function () {
gas.burn();
};
exports.accelerate = function () {
speed += 10;
@humbletim
humbletim / gist:284037
Created January 22, 2010 19:00 — forked from ry/gist:155877
// Answer to http://github.com/ry/http-parser/issues/#issue/1
// UNTESTED
struct line {
char *field;
size_t field_len;
char *value;
size_t value_len;
};