Skip to content

Instantly share code, notes, and snippets.

View diego-mi's full-sized avatar

Diego Mi Campos diego-mi

  • Jaboticabal-SP, Brasil
View GitHub Profile
/*
* NOME FUNCAO: nomeFunction
* FUNCAO: explicacao da funcao da function
*
* Parametros:
* -- parametro - sobre, oque é..
*
* Retorno:
* -- retorno - como e pq
*
;(function( win, doc, $, undefined ) {
'use strict';
function ServiceCEP() {
var $public = {};
var $private = {};
$private.cepValido = function cepValido(dados, prefixo) {
if (dados) {
$("#endereco" + prefixo).val(dados.logradouro);
//elemento = elemento do clique( o input id="cep" )
// precisa-se verificar se ja existe 9 caracteres caso existir -( 00000-000 )
// senao verificar se ha 8 caracteres no input ( 00000000 )
window.Module.ServiceCEP.getEndereco(elemento);
@diego-mi
diego-mi / stylusFile
Created June 15, 2015 18:29
Padrao para criação de files .styl
/*
* Descricao rápida (Ex: Arquivo com estilizacao default para forms)
* Descricao Completa (Ex: Formularios para edicao e adicionar no estilo horizontal...)
* Alerta. (Ex: Ao editar algum item, fazer verificacao das páginas que contem tal classe)
*
* ==============================
*
* INDICE
*
* - Grupo de classes1 (BTNS)
@diego-mi
diego-mi / urlAmigavel
Last active August 29, 2015 14:24
urlAmigavel
<?php
namespace Services\TratarURL;
class UrlAmigavel
{
public function replace_accent($str)
{
$a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž',
<snippet>
<content><![CDATA[
/**
* @var ${1:integer}
*
* @ORM\Column(name="${2:NOME_NO_BD}", type="${1:integer}", nullable=${3:false})
*/
${4:private} \$${5:nomeCampo};
/**
<snippet>
<content><![CDATA[
/**
* Get ${1:nomeCampo}
*
* @return ${1:integer}
*/
public function get${2:NomeCampoCamelCase}()
{
return \$this->${1:nomeCampo};
{
"caret_style": "phase",
"copy_with_empty_selection": false,
"detect_slow_plugins": false,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
<?php
namespace Auth\Authentication\Factory;
use Auth\Authentication\Adapter;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Authentication\AuthenticationService;
use Zend\Authentication\Storage\Session;
<?php
namespace Auth\Authentication\Factory;
use Auth\Authentication\Adapter;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Authentication\AuthenticationService;
use Zend\Authentication\Storage\Session;