Skip to content

Instantly share code, notes, and snippets.

View maetl's full-sized avatar

Mark Rickerby maetl

View GitHub Profile
@maetl
maetl / gist:1037687
Created June 21, 2011 11:44
Postmodern Essay Grammar
// pomo.pb acb ??-09-24 AU
// pb script for generating postmodern verbiage
// Updated, format-independent version
// Copyright (C) 1995, 1996 Andrew C. Bulhak
// this script is property of acb. You are permitted to use, modify and
// distribute it as long as this notice is retained and any modifications
// in distributed copies are clearly denoted.
// if we're using troff, we want two columns
@maetl
maetl / gist:954737
Created May 4, 2011 04:01
asciiiiiiiiiiiiiiiiiiiiiiiiiii
/**
* Test ridiculous UML diagrams embedded in comments:
*
* +-------------+ +----------------+
* | MyBaseClass |--------:>| MyCollaborator |
* +------.------+ +----------------+
* /_\
* |
@maetl
maetl / gist:949816
Created April 30, 2011 17:16
PHP Reflection API
ReflectionClass — The ReflectionClass class
ReflectionClass::__clone — Clones object
ReflectionClass::__construct — Constructs a ReflectionClass
ReflectionClass::export — Exports a class
ReflectionClass::getConstant — Gets defined constants
ReflectionClass::getConstants — Gets constants
ReflectionClass::getConstructor — Gets constructor
ReflectionClass::getDefaultProperties — Gets default properties
ReflectionClass::getDocComment — Gets doc comments
ReflectionClass::getEndLine — Gets end line
@maetl
maetl / gist:946143
Created April 28, 2011 10:36
Properties.php
<?php
/**
* From: http://www.innerweaver.com/articles/php-java-properties
*
* PHP Version of the class java.util.Properties. Loads and saves Java
* .properties files.
*
* The methods inherited from Hashtable are not implemented, as they are
* merely another interface to the same functionality. The save method is not
@maetl
maetl / gist:946129
Created April 28, 2011 10:23
phpDocumentor.ini
;; phpDocumentor parse configuration file
;;
;; This file is designed to cut down on repetitive typing on the command-line or web interface
;; You can copy this file to create a number of configuration files that can be used with the
;; command-line switch -c, as in phpdoc -c default.ini or phpdoc -c myini.ini. The web
;; interface will automatically generate a list of .ini files that can be used.
;;
;; default.ini is used to generate the online manual at http://www.phpdoc.org/docs
;;
;; ALL .ini files must be in the user subdirectory of phpDocumentor with an extension of .ini
@maetl
maetl / gist:856144
Created March 5, 2011 05:22
Linking Git Repository to Floe Project
$ cd lib
$ git clone [email protected]:maetl/floe.git floe
$ cd floe
$ git remote add upstream [email protected]:maetl/floe.git
$ git fetch upstream
@maetl
maetl / deploy.rake
Created February 12, 2011 09:33 — forked from peterc/deploy.rake
desc "Deploy site"
task :deploy do
sh %{git push origin master}
sh %{ssh server "cd /var/www/XXXXX.com;git pull;bundle check || bundle;rake db:migrate;touch tmp/restart.txt;chown -R app:app *"}
end
@maetl
maetl / CABLEGATE - MASTERCARD SCANDAL
Created December 9, 2010 04:33
A 'Lonely Planet' blurb about Turkey's ethnic groups causes a public relations scandal for MasterCard.
FROM: ISTANBUL, TURKEY
TO: STATE DEPARTMENT
DATE: JUNE 1, 2005
CLASSIFICATION: CONFIDENTIAL
SEE FULL CABLE
After briefly basking in the reflected glow of last week's exciting UEFA Champion's League Final in Istanbul between Milan and Liverpool, corporate sponsor Mastercard has found itself dealing with a public relations nightmare in recent days following public criticism of inclusion in its match city guide of critical commentary about both Turkey and its revered founder, Mustafa Kemal Ataturk. The offending passages, first publicized in the liberal Islamist daily "Zaman," addressed the issue of Turkish-Kurdish relations and the Armenian tragedy of 1915. Mastercard briefly closed its office following death threats against its General Manager, and has since officially apologized, noting that the offending material had not been reviewed by any company officials, but instead emanated from the "Lonely Planet," which produced the bulk of the publication. The public reaction, which has also included calls for a
#
# w00t!
# thanks to @pamelafox
# http://google-wave-resources.googlecode.com/svn/trunk/samples/apps/inboxchecker/oauth.py
#
import wsgiref.handlers
import logging
import pickle
import uuid
<div class="element element-input">
<label for="element_input">element-input</label>
<input type="text" name="element_input">
<span class="element-help">This is a short help drescription...</span>
</div>