Skip to content

Instantly share code, notes, and snippets.

View clexmond's full-sized avatar

Chris Lexmond clexmond

  • Unstoppable Games
  • Atlanta, GA
View GitHub Profile
@clexmond
clexmond / identify.coffee
Created November 12, 2015 20:23
User identification in Intercom and FullStory
# Intercom
Intercom.boot
'app_id': INTERCOM_APP_ID
'email': auth.profile.email
'name': auth.profile.name
'created_at': new Date(auth.profile['created_at']).getTime() / 1000
'user_id': auth.profile['user_id']
'widget':
'activator': '#intercom-activator'
@clexmond
clexmond / perlin-noise-classical.js
Created May 1, 2012 23:32 — forked from banksean/perlin-noise-classical.js
Two CommonJS compatible Perlin noise generator modules
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/
@clexmond
clexmond / Entity.php
Created March 1, 2012 01:38
Implementing custom getters and setters in Lithium
<?php
namespace path\to\lib;
use \lithium\data\entity\Record;
/**
* This class can extend either \lithium\data\entity\Record or \lithium\data\entity\Document
* and takes care of automatically calling getters and setters in the format getProperty and
* setProperty.