Skip to content

Instantly share code, notes, and snippets.

View chaseconey's full-sized avatar

Chase Coney chaseconey

View GitHub Profile

install php

with mysql pgsql intl support

$ brew install php --with-apache --with-mysql --with-pgsql --with-intl

set php timezone in php ini

date.timezone = Europe/Vienna
@chaseconey
chaseconey / bootstrap-pagination.js
Created May 15, 2013 22:12
Simple extension for jquery datatables that outputs bootstrap compliant table structure. Use classes 'data-table table'...
$.fn.dataTableExt.oApi.fnPagingInfo = function (oSettings) {
return {
"iStart": oSettings._iDisplayStart,
"iEnd": oSettings.fnDisplayEnd(),
"iLength": oSettings._iDisplayLength,
"iTotal": oSettings.fnRecordsTotal(),
"iFilteredTotal": oSettings.fnRecordsDisplay(),
"iPage": oSettings._iDisplayLength === -1 ?
0 : Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength),
"iTotalPages": oSettings._iDisplayLength === -1 ?