Skip to content

Instantly share code, notes, and snippets.

View rmalenko's full-sized avatar
💭
Open to work

Rostyslav rmalenko

💭
Open to work
View GitHub Profile
@hn-support
hn-support / change_magento2_base_urls_to_https.py
Last active February 20, 2019 10:13
Change all base_urls of your Magento 2 live shop to https on hypernode
#!/usr/bin/env python
"""
Set the base-urls for your Magento 2 installation to support only https.
To use, download the file and make it executable. Then run:
./change_magento2_base_urls_to_https.py
After use, check your base-urls by issuing:
n98-magerun2 sys:store:config:base-url:list
This script requires n98-magerun2.
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@mvadu
mvadu / grafana custom.ini
Last active November 11, 2023 18:26
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@pmoranga
pmoranga / puppet-firewall-docker.pp
Created February 8, 2016 23:55
Make puppetlabs-firewall works with docker smoothly
class my_fw::pre {
# Disable due to selective purges of firewallchain
# resources { "firewall":
# purge => true
# }
# Avoid removing Docker rules:
firewallchain { 'FORWARD:filter:IPv4':
purge => true,
@jgeewax
jgeewax / configure-mailgun
Created December 7, 2015 17:59
Script to configure Postfix for Mailgun
#!/bin/bash
# Configuration for the script
POSTFIX_CONFIG=/etc/postfix/main.cf
POSTFIX_SASL=/etc/postfix/sasl_passwd
function confirm () {
read -r -p "${1:-Are you sure? [Y/n]} " response
if [[ $response == "" || $response == "y" || $response == "Y" ]]; then
echo 0;
@gwillem
gwillem / magento-nginx.conf
Last active July 29, 2023 10:13
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
@sandcastle
sandcastle / iptables.sh
Last active April 30, 2018 12:55
Default firewall configuration using iptables for a fresh Ubuntu 14.04 server.
#!/bin/sh -x
# ==================================
# iptables default configuration script
#
# - this locks down our servers port access
# ==================================
# install fail2ban
sudo apt-get update
@mintindeed
mintindeed / example.conf
Created May 29, 2013 20:03
Example nginx 0.9.x config for accessing memcached caches directly
index index.php index.html index.htm;
upstream phpfcgi {
server 127.0.0.1:9000;
}
upstream memcached {
server example.compute-1.amazonaws.com:11211 max_fails=1 fail_timeout=2s;
server example.compute-1.amazonaws.com:11211 max_fails=1 fail_timeout=2s;
}
@dimkalinux
dimkalinux / menu.sh
Last active April 4, 2024 08:53
User menu file for Midnight Commander
shell_patterns=0
+ ! t t
@ Do something on the current file
CMD=%{Enter command}
$CMD %f
+ t t
@ Do something on the tagged files
set %t; CMD=%{Enter command}
while [ -n "$1" ]; do
@frimik
frimik / puppet-template-patterns.erb
Last active May 6, 2020 12:02
Puppet Template Patterns to remember.
## Check if variable is defined
# Replaces has_variable?(var) and if @var variations.
# include?() pattern from @Jan_vStone.
#
# scope.lookupvar return values for undefined variables:
# Puppet 3.x: nil
# Puppet 2.6.x: :undefined
# Puppet 2.7.x: :undefined
<% if ! [:undefined, nil, ''].include?(masquerade_address = scope.lookupvar('ftp::masquerade_address')) -%>
MasqueradeAddress <%= masquerade_address %>