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
\n | |
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_redirect: %{time_redirect}\n | |
time_starttransfer: %{time_starttransfer}\n | |
----------\n | |
time_total: %{time_total}\n | |
\n |
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
/* | |
* Source: http://stackoverflow.com/a/15378182 | |
*/ | |
::-webkit-input-placeholder { | |
text-align: center; | |
} | |
:-moz-placeholder { /* Firefox 18- */ | |
text-align: center; |
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
/* | |
* Source: http://stackoverflow.com/questions/11041420/how-to-programmatically-open-jquery-accordion-content-panel | |
*/ | |
var $accordion = $("#accordion").accordion(); | |
function openNextAccordionPanel() { | |
var current = $accordion.accordion("option","active"), | |
maximum = $accordion.find("h3").length, | |
next = current+1 === maximum ? 0 : current+1; | |
// $accordion.accordion("activate",next); // pre jQuery UI 1.10 |
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 | |
sudo -u mypleksuser /opt/plesk/php/7.0/bin/php /usr/lib64/plesk-9.0/composer.phar install |
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 | |
# Source: https://support.plesk.com/hc/en-us/articles/213368629--HOW-TO-Get-list-of-domains-and-their-IP-addresses-in-one-query- | |
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -Dpsa -e"SELECT dom.id, dom.name, ia.ipAddressId, iad.ip_address FROM domains dom LEFT JOIN DomainServices d ON (dom.id = d.dom_id AND d.type = 'web') LEFT JOIN IpAddressesCollections ia ON ia.ipCollectionId = d.ipCollectionId LEFT JOIN IP_Addresses iad ON iad.id = ia.ipAddressId" |
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
## If someone enters two slashes, '//' combine them into one | |
merge_slashes on; | |
## Make sure everything is forwarded to https:// | |
if ($scheme = http) { | |
return 301 http://$server_name$request_uri; | |
} | |
## Remove trailing slashes |
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 | |
/* | |
* Source: http://wordpress.stackexchange.com/a/220896 | |
* Used behind a varnish / nginx reverse proxy setup. | |
*/ | |
/** SSL */ | |
define('FORCE_SSL_ADMIN', true); | |
// in some setups HTTP_X_FORWARDED_PROTO might contain | |
// a comma-separated list e.g. http,https |
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 | |
/* | |
* Source: http://www.codedevelopr.com/articles/reading-csv-files-into-php-array/ | |
*/ | |
function readCSV($csvFile){ | |
$file_handle = fopen($csvFile, 'r'); | |
while (!feof($file_handle) ) { |
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 | |
find . -name '*.jpg' -exec convert -verbose -strip -interlace Plane -quality 45% -density 72 {} {} \; |
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
javascript:top.location.href='/wp-admin/post.php?post=' + jQuery('[rel=shortlink]').attr('href').split('=')[1] + '&action=edit'; |