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
#!/bin/bash | |
if ! systemctl is-active --quiet apache2; then | |
MESSAGE="Apache2 server is down on $(hostname) at $(date)" | |
LOGFILE="/var/log/apache2_status.log" | |
echo "$MESSAGE" >> "$LOGFILE" | |
systemctl stop apache2 | |
systemctl start apache2 | |
fi | |
if ! systemctl is-active --quiet php-fpm; then |
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
# Ignore Mac DS_Store files | |
.DS_Store | |
# ignore everything in the root except the "wp-content" directory. | |
/* | |
!wp-content/ | |
# ignore everything in the "wp-content" directory, except: | |
# plugins, and themes directories | |
wp-content/* |
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
[Rasa] | |
Referece: | |
https://docs.anaconda.com/anaconda/install/linux/ | |
{Prerequisites} | |
sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 | |
{Anaconda} | |
conda create --name restabot python=3.7 |
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
wp core download --path=/var/www/html/wordpress --locale=en_US | |
cd /var/www/html/wordpress | |
wp config create --dbname=wordpress --dbuser=root --dbpass=root --locale=en_US | |
wp core install --url=http://localhost/wordpress --title=wordpress --admin_user=admin --admin_password=admin --admin_email=user@example.com | |
wp plugin delete hello akismet |
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 | |
$string = 'Lorem Ipsum is simply dummied text of the printing and typesetting industry.'; | |
echo $algo . ' # ' . hash('sha256', $string) . '<hr>'; | |
foreach(hash_algos() as $algo) | |
{ | |
echo $algo . ' # ' . hash($algo, $string) . '<br>'; | |
} | |
?> |
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
var wait = function(ms) { | |
ms = ms || 500; | |
return new Promise(function(resolve, reject){ | |
window.setTimeout(function() { | |
resolve(); | |
}, ms); | |
}); | |
}; | |
// USAGE |
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 ngrok_fetch($request='',$apiKey='',$method='GET', $postdata=array()) | |
{ | |
$headers = [ | |
'authorization: Bearer ' . $apiKey, | |
'ngrok-version: 2' | |
]; | |
if(empty($postdata) === false) | |
{ |
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
#!/bin/bash | |
while : | |
do | |
echo "Press [CTRL+C] to stop.." | |
~/magento-coding-standard/vendor/bin/phpcbf --standard=Magento2 . | |
~/magento-coding-standard/vendor/bin/phpcs --standard=Magento2 . | |
sleep 60 | |
clear | |
done |
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
.outline-text { | |
font-size: 200px; | |
-webkit-text-stroke: 1px #FFF; | |
color: transparent; | |
-webkit-font-smoothing: subpixel-antialiased; | |
-webkit-text-fill-color: transparent; | |
} |
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
#!/bin/bash | |
echo "---| Set base directory path |---" | |
MAGENTO=$(basename $(pwd)) | |
cd /Applications/MAMP/htdocs/magento/$MAGENTO | |
echo "---| Set PHP base path |---" | |
PHP_BASE_PATH="/Applications/MAMP/bin/php" | |
echo "---| Updating PHP path |---" |
NewerOlder