Skip to content

Instantly share code, notes, and snippets.

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$plugin_info = array(
'pi_name' => 'Log Me',
'pi_version' => '1.0.0',
'pi_author' => 'Erik Reagan',
'pi_author_url' => 'http://focuslabllc.com',
'pi_description' => 'Sample template logging',
'pi_usage' => ''
);
@erikreagan
erikreagan / log_item.php
Created June 18, 2011 13:48
EE Template Debugger log_item function tweak (based on an article by Greg Aker)
<?php>
function log_item($str)
{
if ($this->debugging !== TRUE)
{
return;
}
if ($this->depth > 0)
@erikreagan
erikreagan / ext.entry_global_vars_ext.php
Created June 29, 2011 19:59
Parse global vars within entries in EE 1.x. (Probably could be cleaner, but it'll work for today.)
<?php if ( ! defined('EXT')) exit('Invalid file request');
// ini_set('error_reporting',E_ALL);
/**
* Entry Global Vars
*
* Parse global variables used in your weblog entries.
*
* @package EntryGlobalVars
* @version 1.0.0
@erikreagan
erikreagan / pi.recent_tweet.php
Created July 28, 2011 17:07
Tiny EE1 Plugin to grab the most recent tweet from a given account
<?php
/**
* Recent Tweet
*
* Grab the single most recent tweet based on Twitter's v1 API
* http://api.twitter.com/1/users/lookup.json
* Auto-links URLs with t.co link but displays original URL
*
* @package RecentTweet
@erikreagan
erikreagan / commit.textile
Created August 3, 2011 13:39
recent commit message

Added initial add-ons to repo

Assets
Calendar
CP Analytics
Deployment Hooks
ED ImageResizer
Json
Low Alphabet
Low Reorder

@erikreagan
erikreagan / config.local.php
Created August 8, 2011 12:18
Sample config.local.php file from the Focus Lab, LLC Master Config setup for EE2
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Local config overrides & db credentials
*
* Our database credentials and any environment-specific overrides
* This file should be specific to each developer and not tracked in Git
*
* @package Focus Lab Master Config
* @version 1.1

While checking out Sublime Text 2 here are some things I miss from TextMate:

  • Command + C color palette in CSS files
  • Show invisibles (not quite the same as tab indentions)
  • In-app preview options for syntaxes like Textile, Markdown & HTML

Things I'm loving:

  • Command Palette
<?php
// get constants defined by the application
// All constants available
$constants = get_defined_constants(TRUE);
// just constants from the app in question
$app_constants = $constants['user'];
echo '<pre>';
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Disable Profiler
*
* @package Disable Profiler
* @author Focus Lab, LLC <dev@focuslabllc.com>
* @copyright Copyright (c) 2012 Focus Lab, LLC
* @license MIT http://opensource.org/licenses/mit-license.php
*/