Skip to content

Instantly share code, notes, and snippets.

View luison's full-sized avatar

luison

View GitHub Profile
@luison
luison / regex.custom.pm
Last active December 16, 2020 19:15 — forked from ethanpil/regex.custom.pm
Custom regex rules for CSF/LFD and NginX as a proxy
#!/usr/bin/perl
###############################################################################
# Copyright 2006-2015, Way to the Web Limited
# URL: http://www.configserver.com
# Email: [email protected]
###############################################################################
sub custom_line {
my $line = shift;
my $lgfile = shift;
@luison
luison / nginx.conf
Created November 16, 2020 16:46 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@luison
luison / lxc_mount_bind.md
Created September 1, 2020 16:21 — forked from gionn/lxc_mount_bind.md
How to enable bind mount inside lxc container

How to enable bind mount inside lxc container

When mount is returning:

STDERR: mount: block device /srv/database-data/postgres is write-protected, mounting read-only
mount: cannot mount block device /srv/database-data/postgres read-only

and dmesg shows:

@luison
luison / fix-wordpress-permissions.sh
Last active July 18, 2019 19:19 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
# modified by Jose Luis Moya - alsur.es
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
@luison
luison / .gitignore_wordpress
Last active July 9, 2019 19:03 — forked from gavin-hall/.gitignore_wordpress
Template .gitignore for git-managed WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
# This is my own implementation based on various files
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
@luison
luison / generate-wp-nginx.sh
Last active January 31, 2019 15:29 — forked from Tucker-Eric/generate.sh
Script to generate our WP proxied nginx configurations
SED=`which sed`
CURRENT_DIR=`dirname $0`
echo "Dominio?"
read DOMAIN
# check the domain is valid!
PATTERN="^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$";
if [[ "$DOMAIN" =~ $PATTERN ]]; then
DOMAIN=`echo $DOMAIN | tr '[A-Z]' '[a-z]'`
@luison
luison / ubuntu-webmin.yml
Last active December 14, 2018 11:01 — forked from lzhengqc/ubuntu-webmin.yml
Ansible playbook: install Webmin on Ubuntu
---
#
# Ansible playbook: Webmin for Ubuntu v201501302302
# Louis T. Getterman IV (@LTGIV)
# www.GotGetLLC.com / www.opensour.cc
#
# Example Usage:
# [user@host ~$] ansible-playbook /etc/ansible/playbooks/webmin.yml --extra-vars 'target=nameFromHostsFile'
#
#- hosts: '{{ target }}'
@luison
luison / SassMeister-input.scss
Created January 8, 2018 16:36 — forked from elijahmanor/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// Scut (v0.10.4)
// ----
@import "scut";
@mixin typeset( $type: body-copy ) {
$types: (
@luison
luison / SassMeister-input.scss
Created January 8, 2018 16:36 — forked from elijahmanor/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// Scut (v0.10.4)
// ----
@import "scut";
@mixin typeset( $type: body-copy ) {
$types: (
@luison
luison / sass-maps-index-iterator.css
Created January 5, 2018 20:20 — forked from juanbrujo/sass-maps-index-iterator.css
sass-maps loop with index iterator
/**
* output from sass-maps-index-iterator.scss
*/
li:nth-of-type(1):before {
content: "english - hello";
}
li:nth-of-type(2):before {
content: "spanish - hola";
}