Skip to content

Instantly share code, notes, and snippets.

/**
* CMS Functionality
*
* @author Frank Bardon, Jr. <frank@nerdsrescue.me>
* @version 0.1
*/
var CMS = CMS || {};
CMS.editing = false;
CMS.regions = null;
Timeout 25
KeepAlive On
MaxKeepAliveRequests 250
KeepAliveTimeout 8
HostnameLookups Off
ServerName nerdcms.nerdsrescue.me
ServerTokens Prod
ServerSignature Off
@nerdsrescueme
nerdsrescueme / dispatch.php
Created November 28, 2011 18:20
Atom dispatch
<?php
/**
* Structural design pattern namespace.
*
* Structural design patterns are design patterns that ease the design by
* identifying a simple way to realize relationships between entities.
*
* @package Atom
* @subpackage Design
<?php
namespace Atom;
class Client {
const METHOD_GET = 'GET';
const METHOD_PUT = 'PUT';
const METHOD_POST = 'POST';
const METHOD_DELETE = 'DELETE';
<?php
namespace Atom;
class HttpException extends \Exception {
public function __construct($message, $code)
{
$this->message = (empty($message)) ? 'GET FROM ARRAY' : $message;
}
@nerdsrescueme
nerdsrescueme / file.php
Created November 4, 2011 15:29
Message Implementation
<?php
namespace Atom\Session\Driver;
class File {
protected $path;
public function open($path, $sid)
{
@nerdsrescueme
nerdsrescueme / Conversions.md
Created November 3, 2011 13:47
Measurement

Acceleration

BASE UNIT 'hm/ss;hectometer per square second;hectometers per square second'

attometer/square second: centigal: centimeter/square second: decigal: decimeter/square second: dekameter/square second:

@nerdsrescueme
nerdsrescueme / socket.php
Created October 31, 2011 19:34
Socket Implementation
<?php
//http://code.google.com/p/phpsocketdaemon/source/browse/trunk/socket.php
namespace Atom;
class Socket extends \Atom\Design\Creational\Factory {
// Make static access available.
}
<?php
class Tokenizer {
protected $tokenFormat = '[! %s !]'
protected $rules = array();
protected $raw;
@nerdsrescueme
nerdsrescueme / docblock.php
Created October 21, 2011 20:07
DocBlock Parser
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd