Skip to content

Instantly share code, notes, and snippets.

View spinegar's full-sized avatar

Sean Pinegar spinegar

View GitHub Profile
@spinegar
spinegar / Controller.php
Last active December 28, 2015 15:19
Piwik 2.0 Hello World Tutorial Controller
<?php
/**
* HelloWorld plugin for Piwik 2.0
*
* @author Sean Pinegar
* @link http://seanpinegar.com
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
* @category Piwik_Plugins
* @package HelloWorld
@spinegar
spinegar / en.json
Last active December 28, 2015 15:19
Piwik 2.0 Hello World Tutorial - en.json
{
"HelloWorld": {
"PluginDescription": "Piwik 2.0 Hello World Tutorial",
"submenu": "Overview"
}
}
@spinegar
spinegar / index.twig
Created November 17, 2013 20:22
Piwik 2.0 Hello World Tutorial - index.twig
<h1>Hello World</h1>
@spinegar
spinegar / API.php
Last active December 28, 2015 12:49
Piwik 2.0 Hello World Tutorial - API.php
<?php
/**
* HelloWorld plugin for Piwik 2.0
*
* @author Sean Pinegar
* @link http://seanpinegar.com
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
* @category Piwik_Plugins
* @package HelloWorld
@spinegar
spinegar / plugin.json
Last active December 28, 2015 12:49
Piwik 2.0 Hello World Tutorial - plugin.json
{
"name": "HelloWorld",
"version": "1.0",
"description": "HelloWorld Plugin for Piwik 2.0",
"theme": false,
"author": "Sean Pinegar",
"author_homepage": "http://seanpinegar.com",
"license": "GPL v3",
"license_homepage": "http://www.gnu.org/licenses/gpl-3.0.html"
}
@spinegar
spinegar / tree.txt
Last active December 28, 2015 09:28
Piwik Hello World Tutorial - Structure
├── Piwik/
| |
| ├── plugins/
| │ │
| │ ├── HelloWorld/
| │ │ │
| │ │ ├── API.php
| │ │ ├── Controller.php
| │ │ │
| │ │ ├── lang/
@spinegar
spinegar / HelloWorld.php
Last active December 28, 2015 09:19
Piwik Hello World Tutorial - HelloWorld.php
<?php
/**
* HelloWorld plugin for Piwik 2.0
*
* @author Sean Pinegar
* @link http://seanpinegar.com
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
* @category Piwik_Plugins
* @package HelloWorld
@spinegar
spinegar / Helpers.php
Last active December 26, 2015 13:39
Helper Class
<?php
class Helpers {
/*
|--------------------------------------------------------------------------
| Recursive Array Search
|--------------------------------------------------------------------------
|
| Check if array contains specified key or value
@spinegar
spinegar / sentry_controller_example.php
Created October 24, 2013 17:59
Simple example of an L4 authentication controller using Symfony2
<?php
class AuthController extends BaseController {
public function login()
{
try
{
// Set login credentials
$credentials = array(
'email' => Input::get('email') ?: null,
'password' => Input::get('password') ?: null
OPTIMIZE TABLE accounts;
OPTIMIZE TABLE accounts_audit;
OPTIMIZE TABLE accounts_bugs;
OPTIMIZE TABLE accounts_cases;
OPTIMIZE TABLE accounts_contacts;
OPTIMIZE TABLE accounts_cstm;
OPTIMIZE TABLE accounts_opportunities;
OPTIMIZE TABLE accro_account_roles;
OPTIMIZE TABLE accro_account_roles_accounts_c;
OPTIMIZE TABLE accro_account_roles_audit;