This file contains hidden or 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 | |
function array_delete_by_key(&$array, $delete_key, $use_old_keys = FALSE) { | |
unset($array[$delete_key]); | |
if(!$use_old_keys) { | |
$array = array_values($array); | |
} |
This file contains hidden or 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 | |
$url = 'http://www.example.com'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_USERPWD, "myusername:mypassword"); | |
$result = curl_exec($ch); | |
echo $result; |
This file contains hidden or 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
#add following lines into the ~/.profile file | |
alias svstart='sudo nginx && mysql.server start && sudo php-fpm' | |
alias svstop='sudo nginx -s stop && mysql.server stop && sudo killall php-fpm' | |
alias svrestart='svstop && svstart' |
This file contains hidden or 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
#Optional | |
#add "export PATH=/usr/local/bin:$PATH #homebrew" into your ~/.profile file | |
#brew update | |
#brew doctor | |
# If you see some warnings, resolve it | |
#Tap the homebrew/dupes repository into your brew installation: | |
brew tap homebrew/dupes | |
#Tap the repository into your brew installation: |
This file contains hidden or 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 | |
$parts = explode(DIRECTORY_SEPARATOR, $_SERVER['PWD']); | |
$server = $parts[count($parts) - 1]; | |
switch ($server) { | |
case 'directory': | |
$_SERVER['DB1_NAME'] = 'database-name'; | |
break; | |
This file contains hidden or 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
#config.neon | |
production < common: | |
includes: | |
- production.php |
This file contains hidden or 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
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" | |
[xdebug] | |
xdebug.idekey="macgdbp" | |
xdebug.remote_enable=1 | |
xdebug.remote_host="localhost" | |
xdebug.remote_port=9089 | |
xdebug.remote_handler="dbgp" |
This file contains hidden or 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 | |
# version 1.4.8.2 | |
# in file <folder-with-preshashop>/admin/tabs/AdminOrders.php | |
# find line "$this->colorOnBackground = true;", after that write: $this->delete = true; | |
#... | |
class AdminOrders extends AdminTab | |
{ | |
public function __construct() |
This file contains hidden or 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 | |
/** | |
* Object representing a DOM element. | |
* | |
* @package PHPUnit_Selenium | |
* @author Giorgio Sironi <[email protected]> | |
* @copyright 2010-2011 Sebastian Bergmann <[email protected]> | |
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License | |
* @version Release: @package_version@ |
This file contains hidden or 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
#add with command: git config --global core.excludesfile ~/.gitignore_global | |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so |