Skip to content

Instantly share code, notes, and snippets.

View luizeof's full-sized avatar
🎯
Focusing

Luiz Eduardo de Oliveira Fonseca luizeof

🎯
Focusing
View GitHub Profile
<IfModule mod_headers.c>
Header edit Set-Cookie ^(.*)$ $1;Secure;SameSite=None
Header unset X-Powered-By
</IfModule>
ServerSignature Off
ServerTokens Prod
@luizeof
luizeof / .gitignore
Created December 16, 2019 14:06
Flutter .gitignore
# Created by https://www.gitignore.io/api/dart,swift,xcode,android,intellij,cocoapods,objective-c,androidstudio
### Android ###
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
@luizeof
luizeof / cloudflare-ddns-update.sh
Created October 18, 2019 13:49 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@luizeof
luizeof / cloudflare-ddns-update.sh
Created October 18, 2019 13:49 — forked from foobarhl/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
## Based on https://gist.github.com/Tras2/cba88201b17d765ec065ccbedfb16d9a with updates to use
## per-zone configurable access tokens available in the API sections of your Cloudflare profile
## - info@foo-games.com
@luizeof
luizeof / .htaccess
Created August 23, 2019 16:31 — forked from lukecav/.htaccess
Apache - Browser caching and mod_deflate for WordPress
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/schema+json
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
@luizeof
luizeof / .htaccess
Created August 23, 2019 16:31 — forked from lukecav/.htaccess
Apache mod_expires for WordPress
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault “access plus 1 month”
ExpiresByType text/html "access plus 2 hours"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/js "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
@luizeof
luizeof / .htaccess
Created January 26, 2019 12:18
htaccess multisite
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
@luizeof
luizeof / fix.sh
Created January 25, 2019 12:13
Mautic 1071 Specified key was too long fix
rm app/config/config.php
wget ‐‐directory-prefix=app/config https://github.com/SamvelG/mautic/blob/3525802049f970118d7ed3f55c48cb222f1ee17a/app/config/config.php
mv config.php app/config.php
@luizeof
luizeof / podcast.rss
Created January 6, 2019 03:21
podcast.rss
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="https://rubyplus.com/episodes.rss" rel="self" type="application/rss+xml"/>
<title>Luiz Eduardo - Podcast sobre Mautic, Wordpress, Docker</title>
<link>https://www.rubyplus.com</link>
<description>Learn practical tips and techniques on how to develop web applications using Ruby on Rails web framework. The episodes are short to minimize the amount of content to avoid overwhelming learners. The episodes are designed to give developers a quick way to get their feet wet and learn by building web apps.</description>
<language>en</language>
<pubDate>Sun, 06 Jan 2019 00:48:34 +0000</pubDate>
<lastBuildDate>Sun, 06 Jan 2019 00:48:34 +0000</lastBuildDate>
@luizeof
luizeof / install-mautic-dashboard-warm.sh
Last active December 29, 2018 21:02
install-mautic-dashboard-warm.sh
wget https://github.com/TheDMSGroup/mautic-dashboard-warm/archive/master.zip
unzip master.zip
mv mautic-dashboard-warm-master plugins/MauticDashboardWarmBundle
rm -rf app/cache
mkdir -p app/cache
chown -R www-data:www-data app/cache
chown -R www-data:www-data plugins/MauticDashboardWarmBundle