Skip to content

Instantly share code, notes, and snippets.

View mauriciogofas's full-sized avatar

Mauricio Gofas mauriciogofas

View GitHub Profile
@mauriciogofas
mauriciogofas / configuracao_adicional.php
Last active January 12, 2021 20:48
Exemplo de array de configuração adicional para o módulo Gerencianet Boleto para WHMCS. /modules/gateways/gofasgerencianetboleto/includes/customconfig/configuracao_adicional.php
<?php
/**
* Módulo Gerencinet Boleto para WHMCS
* @author Mauricio Gofas | gofas.net
* @see https://gofas.net/?p=7893
* @copyright 2016->2018 Gofas Softwares
* @license https://gofas.net?p=9340
* @support https://gofas.net/?p=7856
* @version 2.2.1
*/
@mauriciogofas
mauriciogofas / product_groups_to_ignore.php
Last active January 12, 2021 20:50
Ignorar Grupos de produtos ao gerar o Boleto - Módulo Gofas Gerencianet Boleto para WHMCS #whmcs #gerencianet #boleto #ggnb
<?php
/**
* Módulo Gerencinet Boleto para WHMCS
* @author Mauricio Gofas | gofas.net
* @see https://gofas.net/?p=7893
* @copyright 2016->2018 Gofas Softwares
* @license https://gofas.net?p=9340
* @support https://gofas.net/?p=7856
* @version 2.2.1
*/
@mauriciogofas
mauriciogofas / custom_field_to_ignore.php
Last active April 2, 2023 22:50
Definir gerar ou não o boleto ao gerar a fatura no perfil do cliente, via custom field #whmcs #gerencinet #boleto #ggnb
<?php
/**
* Módulo Gerencinet Boleto para WHMCS
* @author Mauricio Gofas | gofas.net
* @see https://gofas.net/?p=7893
* @copyright 2016->2018 Gofas Softwares
* @license https://gofas.net?p=9340
* @support https://gofas.net/?p=7856
* @version 2.2.1
*/
@mauriciogofas
mauriciogofas / product_groups_to_ignore.php
Last active March 23, 2019 05:08
/modules/gateways/gofasgerencianetboleto/includes/customconfig/product_groups_to_ignore.php
<?php
/**
* Módulo Gerencinet Boleto para WHMCS
* @author Mauricio Gofas | gofas.net
* @see https://gofas.net/?p=7893
* @copyright 2016->2018 Gofas Softwares
* @license https://gofas.net?p=9340
* @support https://gofas.net/?p=7856
* @version 2.2.1
*/
@mauriciogofas
mauriciogofas / custom_field_to_ignore.php
Last active March 23, 2019 05:09
/modules/gateways/gofasgerencianetboleto/includes/customconfig/custom_field_to_ignore.php
<?php
/**
* Módulo Gerencinet Boleto para WHMCS
* @author Mauricio Gofas | gofas.net
* @see https://gofas.net/?p=7893
* @copyright 2016->2018 Gofas Softwares
* @license https://gofas.net?p=9340
* @support https://gofas.net/?p=7856
* @version 2.2.1
*/
@mauriciogofas
mauriciogofas / gist:5145d37a344b8b9a76b9fa1803e18c1a
Created March 7, 2018 19:38 — forked from casivaagustin-zz/gist:9261586
nginx location rule to redirect non existing images to another server
#Rewrites the request, extracting a fragment of the file name and using a remote server.
location @fetchFromRemote {
rewrite ^/path/to/images/(.*)$ http://remoteserver.com/other/path/to/images/$1 redirect;
}
#Will try to see if we have the file in this server, is not will use fetchFromRemote
location ~ ^/path/to/images/.*(png|jpg|jpeg|gif|ico|swf)$ {
try_files $uri @fetchFromRemote;
}
@mauriciogofas
mauriciogofas / child.js
Created December 15, 2017 08:39 — forked from mohandere/child.js
Iframe height issue - make iframe height dynamic based on content inside
(function(){
'use-strict';
/**
* Iframe to Parent window communication
* sample iframe- <iframe id="guestFrame" name="guestFrame" src="http://other-domain.com/">
* </iframe>
* Uses https://ternarylabs.github.io/porthole/
* Uses https://marcj.github.io/css-element-queries/
@mauriciogofas
mauriciogofas / gofas_whmcs_favicon.php
Created December 5, 2017 22:01
Add favicon in WHMCS admin and Alient Area
<?php
/**
* Include custom code in template head
* © 2017 gofas.net
*
*/
// Favicon in clientarea
add_hook( 'ClientAreaHeadOutput', 1, function( $vars ) {
$gofas_clientarea_favicon = array();
<?php
echo '<pre>';
var_dump(curl_version());
echo '</pre>';
@mauriciogofas
mauriciogofas / gofas_custom_AffiliateClickthru.php
Last active January 20, 2020 13:28
WHMCS Custom affiliates redirects
<?php
/**
* Custom Affliates Redirects
* © 2017 gofas.net
*
*/
add_hook('AffiliateClickthru', 1, function($vars) {
$affiliate_id = (int)$vars['affiliateId'];
$destination = (string)'https://example.com'; // default destination after affiliate link click