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

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/

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:

@djekl
djekl / CurlRequest.php
Created June 18, 2014 13:25
Example Curl Class Wrapper
<?php
class CurlRequest
{
private $api_key;
private $ch;
public function __construct($api_key)
{
$this->api_key = $api_key;
@djekl
djekl / valid_nhs_number.php
Created June 26, 2014 08:37
Simple function to check for a valid NHS number (with example usage)
<?php
// start with our test NHS number
$nhs_no = '401 023 2137';
function validNhsNumber($nhs_no)
{
// save the input number for the exception
$input_nhs_no = $nhs_no;
@djekl
djekl / sm-annotated.js
Created July 1, 2014 16:31 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
(function() {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
<?php
namespace Acme\Html;
use Illuminate\Html\FormBuilder as IlluminateFormBuilder;
class FormBuilder extends IlluminateFormBuilder {
/**
* An array containing the currently opened form groups.
@djekl
djekl / stripe_sub_wo_cc.php
Created July 30, 2014 20:06
Laravel Cashier Free Subscription w/o Credit Card Filter
<?php
Route::filter('stripe.plans.free', function() {
if (Auth::guest() || Auth::user()->subscribed()) {
return;
}
$user = Auth::user();
$chosenPlan = 'free';
Verifying that +djekl is my Bitcoin username. You can send me #bitcoin here: https://onename.io/djekl

Ubuntu 14.04+ 32bit (ubuntu-mate.org)

Simple steps for installing required tools after fresh Ubuntu install.
Or use installer and uninstaller scripts, they won't break anythng!!

Included

  • Licensed Sublime Text 3 (build 3065)
  • Nginx 1.6.2 (stable version)
  • PHP 5.6.3 (stable version)
  • NVM v0.20.0 (for Node.js and NPM)

SublimeText3 Valid License without cracking! Just download/install then use this license.

----- BEGIN LICENSE -----
Alexey Plutalov
Single User License
EA7E-860776
3DC19CC1 134CDF23 504DC871 2DE5CE55
585DC8A6 253BB0D9 637C87A2 D8D0BA85
AAE574AD BA7D6DA9 2B9773F2 324C5DEF
17830A4E FBCF9D1D 182406E9 F883EA87