Skip to content

Instantly share code, notes, and snippets.


Fábián Gábor FabianGabor

View GitHub Profile
FabianGabor / nginx-subdomain-redirect-to-dir.nginx
Last active Feb 25, 2021 — forked from gsanders5/example.nginx
Automatic nginx virtual subdomains with sub-folders or sub-directories
View nginx-subdomain-redirect-to-dir.nginx
# Automatic nginx virtual subdomains with sub-folders or sub-directories
# Since the original source where I found this code is now offline, I have decided to mirror it here.
# All credit goes to:
# Description: In my web root directory I wanted create a folder called photos, and another called
# music using a sftp program. Without manually going back to the config file or to the shell I like to
# be able to access them at and That is what this config does.
# Redirect visitors from to
View wordpress.different-langauges.php
// setup one language for admin and the other for theme
// must be called before load_theme_textdomain()
function set_my_locale($locale) {
$locale = ( is_admin() ) ? "en_US" : "it_IT";
setlocale(LC_ALL, $local );
return $locale;
add_filter( 'locale', 'set_my_locale' );
#Put in /etc/
#Block ads, malware, etc.
# Only block wireless ads? Y/N
# IPv6 support? Y/N
View vt_resize.php
* Resize images dynamically using wp built in functions
* Victor Teixeira
* php 5.2+
* Exemplo de uso:
* <?php