Skip to content

Instantly share code, notes, and snippets.

View tomwalder's full-sized avatar

Tom Walder tomwalder

View GitHub Profile
@tomwalder
tomwalder / gist:bca384a8f49a09a9b0ac
Created June 2, 2015 13:59
PtgDoughnut Chart.js extension
/**
* Custom chart
*/
Chart.types.Doughnut.extend({
name: "PtgDoughnut",
// Check if we need to extend the scale
initialize: function(data){
this.options.onAnimationProgress = function(easeDecimal){
this.drawPercentage((easeDecimal * this.segments[0].value).toFixed(1));
@tomwalder
tomwalder / DB Tests
Created June 22, 2015 14:13
Potential Di DB studd
<?php
namespace Docnet;
class LazyDB
{
protected $obj_db = NULL;
protected $obj_db_settings = NULL;
@tomwalder
tomwalder / create.php
Created July 9, 2015 10:20
Example GDS create with long strings
<?php
// Define our Model Schema
$obj_book_schema = (new GDS\Schema('Book'))
->addString('title')
->addString('author')
->addString('isbn', TRUE)
->addDatetime('published', FALSE)
->addString('text', FALSE);