Skip to content

Instantly share code, notes, and snippets.


Hypernode Support hn-support

View GitHub Profile
View whitelist-development-exception.conf
# You can whitelist request that should be exempt from the development
# basic auth.
# It's possible to whitelist request based on their IP address, range,
# User-Agent, or by the requested URL.
# Please note though, that google and bing bots will always remain
# blocked on development nodes!
# Both IP addresses and IP ranges can be whitelisted here.
geo $development_exceptions_ip {
default "Development restricted area";
View Example VCL Magento 2
vcl 4.0;
import std;
# The minimal Varnish version is 4.0
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'
backend default {
.host = "";
.port = "8080";
hn-support / Example snippet server.shopware
Last active Feb 22, 2019
Example Shopware Nginx rewrites
View Example snippet server.shopware
###General rewrites
location @shopware {
rewrite / /shopware.php;
# use shopware.php as index.php
location ~ ^/ {
# rewrite / /shopware.php;
index shopware.php index.php;
hn-support / server.shopware
Last active Jan 28, 2020
Shopware Nginx configuration
View server.shopware
## Author: Benjamin Cremer
## Shopware nginx rules.
## Heavily Inspired by
## Designed to be included in any server {} block.
## Please note that you need a PHP-FPM upstream configured in the http context, and its name set in the $fpm_upstream variable.
# don't log favicon hits
location = /favicon.ico {
log_not_found off;
View server-name-wordlist-mnemonic.txt
# Original blog post: <>
# Original word list: <>
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1`
#!/usr/bin/env python
""" Hypernode searchd cron watchdog
This script checks the pid of the searchd daemon and restarts it when the service is not running
It works for both Magento 1 and Magento 2 and for both live and staging.
To run it, add it to the crontab of your hypernode.
For Magento 1:
* * * * * flock -n ~/.searchd_live /data/web/ --environment live --version 1 (live)
hn-support /
Created Jun 1, 2017
Cleanup scripts for hacked magento shops
# Find files that contain suspicious php code
grep -RE 'preg_replace\(|eval\(|base64_decode\(' --include='*.php' . | cut -d: -f 1 | sort -u | while read line ; do echo $line | cat - $line | less ; done

Magento testing scenarios

For use after an upgrade to verify the correct working of Magento




  • Activate all logs on the server (PHP, MySQL, Magento, mail, etc)
  • Check meta tags in HTML
hn-support /
Last active Oct 9, 2017
Test urls using curl
# This script is a very basic curl utility to analyze urls.
# To use it, download the file, make it executable, and run:
# ./
if [ "x${URL}" == "x" ] || [[ ! "${URL}" =~ "http" ]] ; then
echo "Usage: $0 <url>"
exit 1
hn-support /
Last active Dec 13, 2018
Copy and adjust your base_urls for Magento 2 staging environment on hypernode
#!/usr/bin/env python
Set the base-urls for your Magento 2 staging environment by copying and adjusting the base-urls from your production site.
To use, download the file and make it executable. Then run:
After use, check your base-urls by issuing:
n98-magerun2 sys:store:config:base-url:list
This script requires n98-magerun2.
You can’t perform that action at this time.