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
para gerar o csr: | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/your_domain_name.key -out /path/to/your_domain_name.crt | |
alterar as seguintes linhas na config do nfservice.com.br para os novos arquivos | |
SSLCertificateFile /path/to/cert.crt /*certificado que veio da certificadora*/ | |
SSLCertificateKeyFile /path/to/your_domain_name.key /*key que voce gerou la em cima */ | |
SSLCertificateChainFile /path/to/DigiCertCA.crt /*crt que a certificadora manda, se renovar na mesma certificadora, nem precisa mudar*/ |
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
git reset --hard HEAD~1 |
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
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> | |
<script> | |
$(function(){ | |
$.get('https://api.mercadolibre.com/sites/MLB/categories', function(categories){ | |
for (var i in categories) { | |
$('#categories').append('<option value="'+categories[i].id+'">'+categories[i].name+'</option>'); | |
} | |
}); | |
}); |
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
UPDATE parametros SET `natoppadrao` = (SELECT id FROM cfop WHERE cfop.cfop = (SELECT tiponotas.cfop FROM tiponotas WHERE tiponotas.id = parametros.natoppadrao) AND cfop.group_id = parametros.group_id) |
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
DELETE n1 FROM lancamento_contas n1, lancamento_contas n2 WHERE n1.id > n2.id AND n1.nroduplicata = n2.nroduplicata AND n1.group_id = n2.group_id |
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
insert into almoxarifado_produtos (produto_id, almoxarifado_id, quantidade, created, modified, group_id, user_id) | |
SELECT id, almoxarifado_id, 0, '2013-10-04 10:00:00', '2013-10-04 10:00:00', group_id, user_id FROM `produtos` WHERE NOT EXISTS(SELECT id FROM almoxarifado_produtos WHERE produto_id = produtos.id); |
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
insert into dues_storage (f1, f2, f3, cd) | |
select f1, f2, f3, current_date() from dues where id = 5; |
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
SELECT * FROM `produtos` WHERE NOT EXISTS(SELECT id FROM almoxarifado_produtos WHERE produto_id = produtos.id); |
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 | |
public function admin_cadastrar() { | |
$this->set('title_for_layout', 'Novo Evento'); | |
if ($this->request->is('post')) { | |
$this->Evento->create(); | |
$destino = WWW_ROOT.'files/evento/fotos/'.$this->Evento->id.'/'; | |
$arquivo = $destino.$this->request->data['Evento']['fotos']['name']; | |
$ext = strtolower(end(explode('.',$arquivo))); |
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 | |
public function cep($cep) { | |
$this->autoRender=false; | |
$resultado = file_get_contents('http://republicavirtual.com.br/web_cep.php?cep='.urlencode($cep).'&formato=javascript'); | |
if(!$resultado){ | |
$resultado = "&resultado=0&resultado_txt=erro+ao+buscar+cep"; | |
} | |
return $resultado; | |
} |
NewerOlder