Skip to content

Instantly share code, notes, and snippets.

View quinhone's full-sized avatar

Luis Carlos Quinhone quinhone

  • Autônomo
  • Brasil
View GitHub Profile
@quinhone
quinhone / ws_tnt.php
Created November 14, 2022 19:37 — forked from dimaspante/ws_tnt.php
Webservice TNT Logística
<?php
$xmlr = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.calculoFrete.mercurio.com" xmlns:mod="http://model.vendas.lms.mercurio.com">
<soapenv:Header/>
<soapenv:Body>
<ser:calculaFrete>
<ser:in0>
<mod:login>' . $user_login . '</mod:login>
<mod:senha></mod:senha>
<mod:nrIdentifClienteRem>' . $cnpj . '</mod:nrIdentifClienteRem>
@quinhone
quinhone / iin_card
Created July 16, 2019 19:48 — forked from gusribeiro/iin_card
Regex para identificar bandeiras do cartão de crédito
Amex: /^3[47][0-9]{13}/
Diners Club: /^3(?:0[0-5]|[68][0-9])[0-9]{11}/
Visa: /^4[0-9]{12}(?:[0-9]{3})/
Mastercard: /^5[1-5][0-9]{14}/
Discover: /^6(?:011|5[0-9]{2})[0-9]{12}/
Hipercard: /^(606282\d{10}(\d{3})?)|(3841\d{15})/
Elo: /^((((636368)|(438935)|(504175)|(451416)|(636297))\d{0,10})|((5067)|(4576)|(4011))\d{0,12})/
JCB: /^(?:2131|1800|35\d{3})\d{11}/
//Nas rotas:
Route::get('empresa', array('before' => 'lang', 'as' => 'site_empresa', 'uses' => 'EmpresaController@getIndex'));
//No Filter:
Route::filter('lang', function()
{
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if(!Session::has('lang'))
@quinhone
quinhone / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<polymer-element name="my-element">
object(Illuminate\Database\Eloquent\Collection)[297]
protected 'items' =>
array (size=2)
0 =>
object(SiteSettingFilial)[293]
protected 'table' => string 'sites_settings_filiais' (length=22)
protected 'primaryKey' => string 'site_filial_id' (length=14)
protected 'connection' => null
protected 'perPage' => int 15
public 'incrementing' => boolean true