location /robots.txt { return 200 "### Autogenerated robots.txt\n
# Sitemap
Sitemap: https://$http_host/sitemap.xml
# Crawlers Setup
User-agent: *
Crawl-delay: 20
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
<session_save>db</session_save> | |
<redis_session> | |
<host>redismaster</host> | |
<port>6379</port> | |
<password></password> | |
<timeout>2.5</timeout> | |
<persistent></persistent> | |
<db>2</db> | |
<compression_threshold>2048</compression_threshold> | |
<compression_lib>gzip</compression_lib> |
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 | |
# monitors iops per 30 sec interval, and prints current http and sql transactions if iops avg > 100 | |
while true; do | |
iops=$(iostat xvdf -d 30 2 | tail -2 | head -1 | awk '{print $2}' | cut -d. -f1) | |
if [[ "$iops" -gt 100 ]]; then | |
echo "-------------------------------------------------------------------" | |
echo "IOPS: $iops" | |
echo |
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
'session' => array( | |
'save' => 'redis', | |
'redis' => array( | |
'host' => 'redismaster', | |
'port' => '6379', | |
'password' => '', | |
'timeout' => '2.5', | |
'persistent_identifier' => '', | |
'database' => '2', | |
'compression_threshold' => '2048', |
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
'cache' => array( | |
'frontend' => array( | |
'default' => array( | |
'backend' => 'Cm_Cache_Backend_Redis', | |
'backend_options' => array( | |
'server' => '127.0.0.1', | |
'port' => '6379', | |
), | |
), | |
), |
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
'cache' => array ( | |
'frontend' => array ( | |
'default' => array ( | |
'backend' => 'Cm_Cache_Backend_Redis', | |
'backend_options' => array ( | |
'server' => '127.0.0.1', | |
'port' => '6379', | |
), | |
), | |
// Start of snippet |
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 | |
# This script checks if there is enough diskspace available on your hypernode | |
# to create a basic staging environment as explained in | |
# - https://support.hypernode.com/knowledgebase/using-a-basic-staging-environment-magento1/ | |
# and | |
# - https://support.hypernode.com/knowledgebase/using-a-basic-staging-environment-magento2/ | |
# To use it, download or copy the script and make it executable. | |
# is there enough space? | |
DBNAME=$(magerun --root-dir=~/public db:info dbname) |
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 | |
/* | |
This script tests whether your php installation is able to create TLS connections. | |
*/ | |
foreach ([6, 7, 8] as $version) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "https://tlstest.paypal.com/"); | |
curl_setopt($ch, CURLOPT_SSLVERSION, $version); | |
var_dump(curl_exec($ch)); | |
var_dump(curl_error($ch)); |
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
# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/> | |
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt> | |
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1` | |
acrobat | |
africa | |
alaska | |
albert | |
albino | |
album | |
alcohol |
OlderNewer