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
(function() { | |
var lang = navigator.language.split('-')[0], | |
amazonPattern = /amazon.(com|co\.uk|ca|de|fr|es|it|cn|co\.jp).*\/(asin|dp|gp|product|exec\/obidos|gp\/offer-listing|product\-reviews|gp\/aw\/d)\/[A-Z0-9]{10,13}/i, | |
isAmazon = location.href.search(amazonPattern) >= 0; | |
if (isAmazon) try { | |
var r = document.getElementById("ASIN").value; | |
window.open("https://www.hagglezon.com/" + lang + "/s/" + encodeURIComponent(window.location.origin + "/dp/" + r), "_blank") | |
} catch (d) { | |
window.open("http://github.com/mehdichaouch/bookmarklets", "_blank") | |
} |
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 | |
# | |
# Don't change the following lines unless you know what you are doing | |
# They execute the config options starting with 'do_' below | |
grep -E -v -e '^\s*#' -e '^\s*$' <<END | \ | |
sed -e 's/$//' -e 's/^\s*/\/usr\/bin\/raspi-config nonint /' | bash -x - | |
# | |
############# INSTRUCTIONS ########### | |
# | |
# Change following options starting with 'do_' to suit your configuration |
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
// https://magento.stackexchange.com/questions/310578/how-to-debug-ui-component-only-showing-spinner | |
// https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_logger.html | |
require(['Magento_Ui/js/lib/logger/console-logger', | |
'Magento_Ui/js/lib/logger/levels-pool'], | |
function(logger, levels) { | |
logger.setDisplayLevel(5) // 2 = WARN 5 = ALL, see levels-pool.js | |
} | |
); |
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/sh | |
### | |
# @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) | |
### | |
#set -v | |
#set -x |
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
SELECT | |
cw.name AS 'Website', | |
p.method AS 'Payment method code', | |
CASE | |
WHEN p.method = "pbridge_ogone_direct_debit" THEN '' | |
WHEN p.method = "forter_dummy" THEN '' | |
WHEN p.method = "crretail_offlineonepay" THEN '1PAY' | |
WHEN p.method = "crretail_offlinecreditcardamericanexpress_ipp" THEN 'AMEX IPP' | |
WHEN p.method = "crretail_alipay" THEN 'Alipay' | |
WHEN p.method = "moneybookers_pwy" THEN 'All Polish Banks' |
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
" _ _ " | |
" _ /|| . . ||\ _ " | |
" ( } \||D ' ' ' C||/ { % " | |
" | /\__,=_[_] ' . . ' [_]_=,__/\ |" | |
" |_\_ |----| |----| _/_|" | |
" | |/ | | | | \| |" | |
" | /_ | | | | _\ |" | |
It is all fun and games until someone gets hacked! |
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. | |
------------------------------------------------------------------------------------------ |