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/bash | |
if [ "${1}" = "--uninstall" ]; then | |
/bin/rm -rf /usr/bin/gisto /usr/bin/nw.pak /usr/share/applications/gisto.desktop usr/share/menu/gisto /usr/share/pixmaps/gisto.png /usr/share/pixmaps/gisto.xpm | |
echo -e '\n\n\n\e[44m \e[0m Congrats! Gisto removed from your machine.\n\n\n' | |
exit 1 | |
fi | |
is_root() { | |
if [[ $EUID -ne 0 ]]; then |
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/bash | |
LOGOPTS= | |
END_AND_BEGIN= | |
#https://github.com/esc/git-stats | |
#argument parsing | |
while [ -n "$1" ]; do | |
case "$1" in | |
"-s") | |
shift | |
END_AND_BEGIN="$END_AND_BEGIN --after=$1" |
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
Order Deny,Allow | |
Deny from all |
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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
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
$numbers = array(22, 60, 876, 95, 77); | |
// Initializing the Iterator | |
$iterator = new ArrayIterator($numbers); | |
// Pass the converted array to the LimitIterator | |
$limiter = new LimitIterator($iterator, 0 , 4); | |
// Loop through the LimitIterator object | |
foreach ($limiter as $number) { |
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
/*** nullify any existing autoloads ***/ | |
spl_autoload_register(null, false); | |
/*** specify extensions that may be loaded ***/ | |
spl_autoload_extensions('.php'); | |
/*** class Loader ***/ | |
function classLoader($class) | |
{ | |
//$filename = ucfirst(strtolower($class) . '.php') ; |
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
English, US (en_US) | |
German, Germany (de_DE) | |
Chinese, PRC (zh_CN) | |
Chinese, Taiwan (zh_TW) | |
Czech, Czech Republic (cs_CZ) | |
Dutch, Belgium (nl_BE) | |
Dutch, Netherlands (nl_NL) | |
English, Australia (en_AU) | |
English, Britain (en_GB) | |
English, Canada (en_CA) |
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
protected function _initRouter() | |
{ | |
$frontController = Zend_Controller_Front::getInstance(); | |
$router = $frontController->getRouter(); | |
// Product view route | |
$route = new Zend_Controller_Router_Route( | |
'/home', | |
array( | |
'controller' => 'index', |
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
// BookList/Module.php (a custom ZF2 module) | |
public function onBootstrap(MvcEvent $e) | |
{ | |
$translator = $e->getApplication()->getServiceManager()->get('translator') ; | |
$translator->setLocale(\Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE'])) | |
->setFallbackLocale('en_US') ; | |
} |
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
return array ( | |
'Doctrine' => array ( | |
'Connection' => array ( | |
'Orm_ default ' => array ( | |
'DriverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver' , | |
'Params' => array ( | |
'Host' => 'localhost' , | |
'Port' => '3306 ' , | |
'User' => 'root' , | |
'Password' => '' , |
OlderNewer