Skip to content

Instantly share code, notes, and snippets.

@inxilpro
inxilpro / User.php
Created December 10, 2009 14:46
Sample code output from Galahad_Tool (see http://github.com/inxilpro/Galahad-FE/ for the rest of the code)
<?php
class Default_Form_User extends Zend_Form
{
public function init()
{
// Use the init() method to generate your form
$this->addElement('text', 'id', array(
'label' => 'Id',
<dl>
<dt><label for="username">Username:</label></dt>
<dd>
<input type="text" id="username" name="username" />
<label for="username" class="instructions">Please enter your username.</label>
</dd>
</dl>
<?php
$options = array(
'loginId' => 'Authorize.net Login ID',
'transactionKey' => 'Authorize.net Transaction Key',
'mode' => 'test'
);
$gateway = Galahad_Payment::factory('AuthorizeNet', $options);
$customer = new Galahad_Payment_Customer(array(
'firstName' => 'John',
RewriteCond %{DOCUMENT_ROOT}/css/main.min.css -f
RewriteRule ^css/main\.css$ css/main.min.css
@inxilpro
inxilpro / template-portfolio.php
Created November 3, 2010 22:22
Modified portfolio to allow for page content
<?php
/*
Template Name: Portfolio
*/
?>
<?php global $woo_options; ?>
<?php get_header(); ?>
<?php
/*
This User model handles everything related to users. Most of the code is
ommitted, because it's not relevant to this example.
*/
class User
{
public static function loadUserByCredentials($username, $password)
@inxilpro
inxilpro / http_response_code.php
Created August 23, 2013 15:08
Polyfill for PHP 5.4's http_response_code() function.
<?php
if (!function_exists('http_response_code')) {
function http_response_code($code = null)
{
static $defaultCode = 200;
if (null != $code) {
switch ($code) {
case 100: $text = 'Continue'; break; // RFC2616
@inxilpro
inxilpro / 1. new-mac-setup.md
Last active December 27, 2015 16:59
New Mac Setup
<?php
function password_parts_message($password) {
$upper = 0;
$upperLetters = array();
$lower = 0;
$numbers = 0;
$special = 0;
$length = strlen($password);

Keybase proof

I hereby claim:

  • I am inxilpro on github.
  • I am inxilpro (https://keybase.io/inxilpro) on keybase.
  • I have a public key whose fingerprint is 0ADB 08AD B1C9 8E2C 0B7B 9C63 D03A 8228 B5A7 6AC1

To claim this, I am signing this object: