git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| <?php | |
| /** | |
| * MEMORY USAGE CLASS | |
| * @REF: http://www.if-not-true-then-false.com/2011/php-memory-usage-information-class/ | |
| */ | |
| class MemoryUsageInformation { | |
| private $real_usage; | |
| private $statistics = array(); | |
| // Memory Usage Information constructor |
| //-------------------------------------------------------------------------- | |
| // See if a url contains http:// or https:// | |
| //-------------------------------------------------------------------------- | |
| if( !preg_match('/http(s?)\:\/\//i', $url) ) { | |
| // URL does NOT contain http:// or https:// | |
| } |
| <?php | |
| $currency_symbols = array( | |
| 'AED' => 'د.إ', // ? | |
| 'AFN' => 'Af', | |
| 'ALL' => 'Lek', | |
| 'AMD' => '', | |
| 'ANG' => 'ƒ', | |
| 'AOA' => 'Kz', // ? | |
| 'ARS' => '$', | |
| 'AUD' => '$', |
| <?php | |
| include '../vendor/autoload.php'; | |
| $classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); | |
| $classLoader->register(); | |
| $classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); | |
| $classLoader->register(); | |
| // config | |
| $config = new \Doctrine\ORM\Configuration(); |
| # Unload all Parallels kernel extensions | |
| for kext in $(kextstat | grep parallels | awk '{print $6}'); do kextunload -v 1 -b $kext; done | |
| # Delete all Parallels kernel extensions | |
| rm -v /System/Library/Extensions/prl* | |
| # Delete all other Parallels files | |
| rm -vr \ | |
| /Applications/Parallels\ Desktop.app \ | |
| /Library/Parallels/Parallels\ Service.app \ |
| <?php | |
| # Source: http://www.jonasjohn.de/snippets/php/headers.htm | |
| // Use this header instruction to fix 404 headers | |
| // produced by url rewriting... | |
| header('HTTP/1.1 200 OK'); | |
| // Page was not found: | |
| header('HTTP/1.1 404 Not Found'); | |
Collection of some of my fav terminal aliases that I use often & collected from the web. This file will be updated with more aliases as I find more. Feel free to comment and share your fav aliases you use :)
vim ~/.bash_profilei and then paste the following at the top of the file:| $ cd ~ | |
| $ sudo curl -sS https://getcomposer.org/installer | sudo php | |
| $ sudo mv composer.phar /usr/local/bin/composer | |
| $ sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
| then you can run | |
| $ sudo composer install |