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 | |
function convert($size) | |
{ | |
$unit=array('b','kb','mb','gb','tb','pb'); | |
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i]; | |
} | |
convert(memory_get_usage()); |
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
Explanations: | |
cache: If you include other words in the query, Google will highlight those words within | |
the cached document. For instance, [cache:www.google.com web] will show the cached | |
content with the word “web” highlighted. This functionality is also accessible by | |
clicking on the “Cached” link on Google’s main results page. The query [cache:] will | |
show the version of the web page that Google has in its cache. For instance, | |
[cache:www.google.com] will show Google’s cache of the Google homepage. Note there | |
can be no space between the “cache:” and the web page url. | |
------------------------------------------------------------------------------------------ |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta name="description" content="Bookmarklet - Generate a Git branch name from Jira issue by Mehdi Chaouch"> | |
<meta name="keywords" content="Bookmarklet,Git,Jira,issue"> | |
<meta name="author" content="Mehdi Chaouch"> | |
<!-- Author: https://gist.github.com/mehdichaouch --> | |
<!-- Required meta tags --> | |
<meta charset="utf-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 | |
$product = $this->getProduct(); | |
// return no link in case of zero night | |
if (is_null($product->getData('nights'))) { | |
return '#'; | |
} | |
$language = Mage::getStoreConfig('general/locale/code'); | |
$country = $dcsInfo->getData('country'); |
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 | |
#set -e | |
#set -x | |
# Oyst API status | |
API_KEY_SANDBOX= | |
API_KEY_STAGING= | |
ENVIRONMENTS=('sandbox' 'staging') # Add more env here if needed ; Add also variable above |
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 | |
yes | pecl install xdebug \ | |
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.remote_connect_back = 1" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.remote_port = 9000" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.scream = 0" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.show_local_vars = 1" >> /usr/local/etc/php/conf.d/xdebug.ini \ |
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 | |
### | |
# @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 | |
# @author Mehdi Chaouch <mehdi@advocodo.com> <@advocodo> | |
# @copyright Copyright (c) 2020 ADVOCODO (https://www.advocodo.com) | |
# @description This script install some developer tools for Magento 2 | |
# @usage ./m2-dev-tools.sh | |
### |
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
# xxxxxxxx is the salt - it can change or stay like that | |
# admin123 is the password, you must change it | |
UPDATE admin_user SET `password` = CONCAT(SHA2('xxxxxxxxadmin123', 256), ':xxxxxxxx:1') WHERE `username` = 'admin'; |
NewerOlder