This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Enhanced PSR-0 autoloader with Phar-Support | |
* | |
* @param $class string Name of the class (with namespace) | |
* | |
* @author Ralf Mike Pretzlaw <[email protected]> | |
* @copyright 2012 Ralf Mike Pretzlaw | |
* | |
* @throws Exception | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace CLI; | |
class Log | |
{ | |
protected $_verbose = false; | |
protected $_debug = false; | |
protected $_quiet = false; | |
protected function _log ( $message, $lineFeed = true ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Requires: JDK | |
# Optional: Mozilla Firefox | |
# TODO A 20121121 path as variable | |
# TODO B 20121121 tar JDK | |
# | |
# install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Mike Pretzlaw | |
* @link http://hallo-php-welt.de | |
* @copyright Mike Pretzlaw | |
* | |
* Example: | |
<?php | |
function foo() { $bar = "handle"; $unset = new Defer\Unset($bar); throw new Exception(); } | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NameVirtualHost subdomain.example.tld:80 | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName subdomain.example.tld | |
ServerAlias subdomain.example.tld | |
DocumentRoot /var/www/subdomain.example.tld | |
# PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5 | |
# PassengerRuby /usr/bin/ruby1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$default = [ | |
'one' => null, | |
'two' => null, | |
]; | |
$incoming = ['two' => 123, 'three' => 345]; | |
// only allow existing keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// text | |
$fieldset->addField('title', 'text', array( | |
'label' => Mage::helper('form')->__('Title3'), | |
'class' => 'required-entry', | |
'required' => true, | |
'name' => 'title', | |
'onclick' => "alert('on click');", | |
'onchange' => "alert('on change');", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class A | |
{ | |
function __construct() | |
{ | |
echo get_class($this->getInstance()), PHP_EOL, | |
get_class(static::getInstance()), PHP_EOL, | |
get_class(self::getInstance()), PHP_EOL; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$methodName = $this->getName(); | |
foreach ($this->getParameters() as $param) | |
{ /** @var \ReflectionParameter $param Iterate over possible params */ | |
$currentParam = ''; | |
if ($param->isPassedByReference()) | |
{ | |
$currentParam = '&'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# requires: https://github.com/aanand/git-up | |
# run in the dir you keep your projects | |
# | |
for dir in `find -maxdepth 1 -mindepth 1 -type d`; | |
do # update git and run xdeploy |
OlderNewer