Skip to content

Instantly share code, notes, and snippets.

View djekl's full-sized avatar
:octocat:
Working from home

Alan Wynn djekl

:octocat:
Working from home
View GitHub Profile

Follow this guide to integrate bar chart reports into your Laravel application. Reports like the following come with this guide:

  • Total number of Orders by day
  • Total number of Users subscribed by day
  • etc

The library used for the charts is: http://www.oesmith.co.uk/morris.js/

First put this into your page that will have the reports (in the Blade view) to include Morris library:

Did I hear you wanted AJAX charts instead of hard coded? You got it.

Follow this guide to integrate bar chart reports into your Laravel application with AJAX. Reports like the following come with this guide:

  • Total number of Orders by day
  • Total number of Users subscribed by day
  • etc

The library used for the charts is: http://www.oesmith.co.uk/morris.js/

@djekl
djekl / convertTwoSpacesToFour.sublime-macro
Last active January 3, 2016 10:59 — forked from joshmfrankel/convertTwoSpacesToFour.sublime-macro
This now doesn't leave the whole text selected :)
[
{
"args": null,
"command": "select_all"
},
{
"args": {
"setting": "tab_size",
"value": 2
},
@djekl
djekl / Sublime Text 2 - Useful Shortcuts (Mac OS X).textile
Created June 5, 2013 16:33 — forked from jonahvsweb/gist:4354137
Sublime Text 2 - Useful Shortcuts (Mac OS X)

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
<?php
/**
* Generate an encryption key for CodeIgniter.
* http://codeigniter.com/user_guide/libraries/encryption.html
*/
// http://www.itnewb.com/v/Generating-Session-IDs-and-Random-Passwords-with-PHP
function generate_token ($len = 32)
{
@djekl
djekl / get_key.php
Created November 13, 2012 15:29 — forked from joostvanveen/get_key.php
Helper function that returns the value for a key in an array or a property in an object. No more endless isset() statements.
<?php
/**
* Return the value for a key in an array or a property in an object.
* @param mixed $haystack
* @param string $needle
* @param mixed $default_value The value if key could not be found.
* @return mixed
*/
function get_key ($haystack, $needle, $default_value = '')
{
@djekl
djekl / psn_friends.php
Created November 10, 2012 20:11 — forked from meg87/psn_friends.php
PHP class to access PlayStation Network friends list.
<?php
// Disable libxml errors and allow user to fetch error information as needed
libxml_use_internal_errors(true);
class PSN_friends
{
public $log_file, $session, $frineds;
function __construct()
{
@djekl
djekl / README.md
Created October 22, 2012 21:03 — forked from mikedfunk/README.md
CodeIgniter Pagination for Twitter Bootstrap

This uses Twitter Bootstrap classes for CodeIgniter pagination.

Drop this file into application/config.

@djekl
djekl / dabblet.css
Created October 9, 2012 08:37 — forked from lensco/dabblet.css
box-shadow vs filter: drop-shadow 2
/**
* box-shadow vs filter: drop-shadow 2
*/
body {
background: #ddd;
font: 16px/1 sans-serif;
margin: 50px;
text-align: right;
@djekl
djekl / dabblet.css
Created October 3, 2012 08:13 — forked from daneden/dabblet.css
<i> Cloud
/* <i> Cloud */
html {
min-height: 100%;
background: linear-gradient(#b4bcbf, #fff);
}
.cloud {
display: inline-block;
background-color: #fff;