Skip to content

Instantly share code, notes, and snippets.

Geoffrey Hoffman phpguru

Block or report user

Report or block phpguru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnSi0RUxRrhmB66fPkoHCPpK3pz953MsEIc/FNmmJhKpvK2IwgjwjXDsMWellY8jTVDmpbEio5PZWCtIFuFOlleAFM/wiocUsSNYMgR2QEeWKqSQ4q76hrkBoIKxThCnI0PRnSFmiXsK74dvEmsBfgEVbJSXd7Kwg1tHBl3FB4vHslCMm5g8e8abRD9wi4iRKxtdxO+jKtQ8JcZ256hrHsaLMz1fXTWlKXd0NoreOcQzO4umqfBxBBY5QIv/GVrbADQlpw3Ilwez/fiw52/dW7F2ndUqJx0O4KGy/bRtLp+f35YsdQzdwgnqMeOA4NnU/iAOixk/zehhcEZ/aYWqB9 geoffrey.hoffman@gmail.com
View static-non-static-mixing.php
<?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";
}
}
View gist:4670029
☹☺☻☃☠
⚠⚡✆♿
✈☎☏☂☔✉☄☽☾☕✇❤
☯✝✞✟☨☦☭☮☪☫☬☩✠☧✡
♈♉♊♋♌♍♎♏♐♑♒♓
♀♂☿♁⚢⚣⚤⚥⚦⚧⚨⚩
❁❀✿✽✾❃⚘☘
♚♔♛♕♜♖♝♗♞♘♟♙
♥♡♠♤♦♢♣♧
✩★☆✪✫✬✭✮✯✰☼☸☉❂
View Date.php
<?php
/**
* Date class
*/
class Date {
/**
* Fuzzy date strings
*
* @var array
View Crypt.php
<?php
class Crypt {
/**
* The encryption cipher
*
* @var string
*/
static public $cipher = MCRYPT_RIJNDAEL_256;
View Curl.php
<?php
class Curl {
/**
* cURL request method
*
* @var string
*/
protected $_method = 'GET';
View Input.php
<?php
class Input {
/**
* Protocol (http or https)
*
* @return string
*/
static public function protocol() {
View Autoload.php
<?php
/**
* TODO: Add support for namespaces... If we ever move to PHP 5.3+
*/
class Autoload {
/**
* Class directories
*
View Environment.php
<?php
class Environment {
/**
* Current environment
*
* @var string
*/
static protected $env;
@phpguru
phpguru / r10ku.sh
Last active Aug 29, 2015
Force update a specific puppet environment using r10k with clearing cache
View r10ku.sh
#!/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 -
You can’t perform that action at this time.