Skip to content

Instantly share code, notes, and snippets.

@airways
airways / gist:877661
Created March 19, 2011 17:52
Lightweight Mac OS X / Linux
  • X11.app X server
  • Fink and MacPorts package managers
    • (may replace MacPorts with Homebrew and use Fink only for things not found in Homebrew such as FireFox and nedit)
  • From source tar balls
    • dwm tiling window manager
  • Fink
    • FireFox (browser)
    • Alpine (email)
  • nedit - language mode files (including PHP): http://www.nedit.org/ftp/contrib/highlighting/
@airways
airways / QUERY_PARAM.md
Created July 19, 2011 22:24
ExpressionEngine: new QUERY_PARAM protocol that always works

QUERY_PARAM Protocol

This is a simple technique which should work on ALL hosts to allow ExpressionEngine to handle URLs without index.php in them. Hopefully EllisLab will add this as a built-in option soon.

IJR

@airways
airways / SUSHI_Model.php
Created August 29, 2011 02:20
CodeIgniter base model classes
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* SUSHI_Model provides a base model class that interacts with SUSHI_ModelRow to
* make saving and loading data easier.
*
* @package default
* @author Isaac Raway
**/
class SUSHI_Model extends CI_Model
@airways
airways / mod.extendedchannel.php
Created October 28, 2011 15:52
ExpressionEngine: Extending a core or third party module or plugin
<?php
class ExtendedChannel {
public __construct()
{
$this->EE = &get_instance();
}
public function extended_entries()
{
@airways
airways / 1 dist.config.php
Created November 1, 2011 00:44
Simple, single ExpressionEngine configuration file to override almost all paths and server settings. As used by @airways and @litzinger.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Simple, single configuration file to override almost all paths and server settings. As used by @airways
// and @litzinger.
// Only check in the default as dist.config.php, set your version control system to ignore config.php so that
// local users and each instance (staging, production) can have their own settings.
// These config files are mainly meant to be used on a shared development server used by all developers,
// although it works almost as well for local development as well.
@airways
airways / core_mod.php
Created January 9, 2012 18:57
Core tags in Cell CMS
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* @package CELL CMS
* @author Isaac Raway (MetaSushi, LLC) <[email protected]>
*
* Copyright (c)2009, 2010, 2011. Isaac Raway and MetaSushi, LLC.
* All rights reserved.
**/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>bundleUUID</key>
<string>0374A255-E6D9-4CD7-8FB6-4F7DAE99AFC7</string>
<key>command</key>
<string>read text
@airways
airways / ext.https.php
Created March 8, 2012 20:44
Force everything to be over HTTPS
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Note: not tested
class Https_ext {
public $settings = array();
public $description = '';
public $docs_url = '';
public $name = 'HTTPS';
public $settings_exist = 'n';
public $version = '1.0';
@airways
airways / gist:2069111
Created March 18, 2012 05:19 — forked from neilj/gist:1532562
Sugared DOM: Better Than Templates
var el = ( function () {
var doc = document;
var directProperties = {
'class': 'className',
className: 'className',
defaultValue: 'defaultValue',
'for': 'htmlFor',
html: 'innerHTML',
@airways
airways / gist:2237779
Created March 29, 2012 14:07
Sample invalid URLs requested by vuln scanning bot
403 Forbidden
/: 11 Time(s)
///recordings/misc/callme_page.php: 1 Time(s)
//admin/index.php: 3 Time(s)
//admin/phpmyadmin/index.php: 3 Time(s)
//admin/pma/index.php: 3 Time(s)
//db/index.php: 3 Time(s)
//dbadmin/index.php: 3 Time(s)
//index.php: 3 Time(s)
//myadmin/index.php: 2 Time(s)