This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/sdk/vendor/autoload.php'; | |
use Gerencianet\Exception\GerencianetException; | |
use Gerencianet\Gerencianet; | |
$clientId = 'your_client_id'; // Client ID da aplicação | |
$clientSecret = 'your_client_secret'; // Client Secret da aplicação | |
$options = [ | |
'client_id' => $clientId, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /var/www/htdocs/WHMCS/modules/gateways/ && wget https://github.com/gofas/whmcs-gerencianet-boleto/archive/master.zip && unzip master.zip && cd whmcs-gerencianet-boleto-master/ && mv gofasgerencianetboleto.php ../ && mv gofasgerencianetboleto/ ../ && cd ../ && rm -rf whmcs-gerencianet-boleto-master/ && rm master.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WPSINGLE BASIC NGINX CONFIGURATION | |
server { | |
server_name woo.rtcamp.net www.woo.rtcamp.net; | |
access_log /var/log/nginx/woo.rtcamp.net.access.log rt_cache; | |
error_log /var/log/nginx/woo.rtcamp.net.error.log debug; | |
root /var/www/woo.rtcamp.net/htdocs; | |
index index.php index.htm index.html; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
target _blank on Admin Bar Home Link | |
*/ | |
add_action( 'admin_bar_menu', 'gofas_site_name', 80 ); | |
function gofas_site_name( $wp_admin_bar ) { | |
//Get a reference to the site-name node to modify. | |
$node = $wp_admin_bar->get_node('site-name'); | |
//Change target | |
$node->meta['target'] = '_blank'; | |
//Update Node. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// remove wp logo Admin Toolbar | |
add_action( 'admin_bar_menu', 'remove_wp_logo', 999 ); | |
function remove_wp_logo( $wp_admin_bar ) { | |
$wp_admin_bar->remove_node( 'wp-logo' ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Acre (AC) | |
Alagoas (AL) | |
Amapá (AP) | |
Amazonas (AM) | |
Bahia (BA) | |
Ceará (CE) | |
Distrito Federal (DF) | |
Espírito Santo (ES) | |
Goiás (GO) | |
Maranhão (MA) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'gettext', 'theme_change_comment_field_names', 20, 3 ); | |
/** | |
* Change comment form default field names. | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function theme_change_comment_field_names( $translated_text, $text, $domain ) { | |
if ( is_singular() ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Font: http://stackoverflow.com/questions/3349753/delete-directory-with-files-in-it */ | |
$dir = '/home/username/public_html/beta/' . DIRECTORY_SEPARATOR . 'sub-folder'; | |
$it = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS); | |
$files = new RecursiveIteratorIterator($it, | |
RecursiveIteratorIterator::CHILD_FIRST); | |
foreach($files as $file) { | |
if ($file->isDir()){ | |
rmdir($file->getRealPath()); | |
} else { |