Skip to content

Instantly share code, notes, and snippets.

View phpguru's full-sized avatar

Geoffrey Hoffman phpguru

View GitHub Profile
<?php
/**
* Date class
*/
class Date {
/**
* Fuzzy date strings
*
* @var array
<?php
class Crypt {
/**
* The encryption cipher
*
* @var string
*/
static public $cipher = MCRYPT_RIJNDAEL_256;
<?php
class Curl {
/**
* cURL request method
*
* @var string
*/
protected $_method = 'GET';
<?php
class Input {
/**
* Protocol (http or https)
*
* @return string
*/
static public function protocol() {
<?php
/**
* TODO: Add support for namespaces... If we ever move to PHP 5.3+
*/
class Autoload {
/**
* Class directories
*
<?php
class Environment {
/**
* Current environment
*
* @var string
*/
static protected $env;
@phpguru
phpguru / r10ku.sh
Last active August 29, 2015 14:06
Force update a specific puppet environment using r10k with clearing cache
#!/bin/bash
#
# Update a specific puppet environment, typically a git branch `featurename`
# or one of your deployment environments, typically `development` or `production`
#
# Save the script as r10ku somewhere in your $PATH and chmod +x it
#
# example usage:
#
# > sudo su -
@phpguru
phpguru / id_rsa.pub
Created June 4, 2012 17:45
Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnSi0RUxRrhmB66fPkoHCPpK3pz953MsEIc/FNmmJhKpvK2IwgjwjXDsMWellY8jTVDmpbEio5PZWCtIFuFOlleAFM/wiocUsSNYMgR2QEeWKqSQ4q76hrkBoIKxThCnI0PRnSFmiXsK74dvEmsBfgEVbJSXd7Kwg1tHBl3FB4vHslCMm5g8e8abRD9wi4iRKxtdxO+jKtQ8JcZ256hrHsaLMz1fXTWlKXd0NoreOcQzO4umqfBxBBY5QIv/GVrbADQlpw3Ilwez/fiw52/dW7F2ndUqJx0O4KGy/bRtLp+f35YsdQzdwgnqMeOA4NnU/iAOixk/zehhcEZ/aYWqB9 geoffrey.hoffman@gmail.com
<?php
class Foo {
public static function bar() {
echo "calling public static bar() in an ".(isset($this)?"object (".get_class($this).")":"static")." context. \n";
}
public function baum() {
echo "calling public baum in an ".(isset($this)?"object (".get_class($this).")":"static")." context. \n";
}
}
☹☺☻☃☠
⚠⚡✆♿
✈☎☏☂☔✉☄☽☾☕✇❤
☯✝✞✟☨☦☭☮☪☫☬☩✠☧✡
♈♉♊♋♌♍♎♏♐♑♒♓
♀♂☿♁⚢⚣⚤⚥⚦⚧⚨⚩
❁❀✿✽✾❃⚘☘
♚♔♛♕♜♖♝♗♞♘♟♙
♥♡♠♤♦♢♣♧
✩★☆✪✫✬✭✮✯✰☼☸☉❂