Skip to content

Instantly share code, notes, and snippets.

View marcelloinfoweb's full-sized avatar

< Marcelo Caetano /> marcelloinfoweb

View GitHub Profile
@marcelloinfoweb
marcelloinfoweb / No Conflict jQuery
Last active October 8, 2015 01:18
Evitar conflito com prototype no magento
<script>
jQuery.noConflict(); //Linha para evitar conflito
jQuery(document).ready(function(){
jQuery('id').hide(); //chamadas sem "$"
});
</script>
@marcelloinfoweb
marcelloinfoweb / Colorbox Magento
Created August 4, 2012 06:47
Colorbox Magento
<script type="text/javascript">// <![CDATA[
jQuery(document).ready(function($) {
(function($) {
$.colorbox({
html: '<a href= "http://www.aulasadistancia.com.br/cursos/dietpro5-5i-2ch-sem-cd.html" _mce_href="http://www.aulasadistancia.com.br/cursos/dietpro5-5i-2ch-sem-cd.html" > <img src="http://www.aulasadistancia.com.br/cursos/pop-up/Promocao-Mes-do-Nutricionista.jpg" _mce_src = "http://www.aulasadistancia.com.br/cursos/pop-up/Promocao-Mes-do-Nutricionista.jpg" class="gallery" title = "Promo&ccedil;&atilde;o M&ecirc;s do Nutricionista" /></a>',
close: 'sair',
photo: true
});
})(jQuery);
});// ]]>
@marcelloinfoweb
marcelloinfoweb / HTML: Estrutura simples
Last active October 8, 2015 01:48
HTML: Estrutura simples
<!DOCTYPE HTML>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="estilo.css">
<title></title>
</head>
<body>
</body>
@marcelloinfoweb
marcelloinfoweb / index.html
Last active October 17, 2017 14:55
Tooltip Pure CSS
<!-- normally this stuff would be on the html element -->
<!--[if lt IE 7]> <div class="ie ie6 lte9 lte8 lte7"> <![endif]-->
<!--[if IE 7]> <div class="ie ie7 lte9 lte8 lte7"> <![endif]-->
<!--[if IE 8]> <div class="ie ie8 lte9 lte8"> <![endif]-->
<!--[if IE 9]> <div class="ie ie9 lte9"> <![endif]-->
<!--[if gt IE 9]> <div> <![endif]-->
<!--[if !IE]><!--> <!--<![endif]-->
<!DOCTYPE html>
<html>
@marcelloinfoweb
marcelloinfoweb / menuFixo.html
Created November 4, 2014 02:11
Fixar Menu no topo.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
<script src="jquery-1.11.1.min.js"></script>
<style>
body {
@marcelloinfoweb
marcelloinfoweb / popUp_img-com-link.js
Last active August 29, 2015 14:10
Pop-Up Colorbox - Imagem com Link
@marcelloinfoweb
marcelloinfoweb / Sublime.ini
Last active April 26, 2017 19:18 — forked from raloliver/gist:6786f9fba0edfefc7de9
Configurações para o Sublime como IDE para PHP / JS
Finalmente, agora eu tenho tudo quase perfeito com o Sublime, só me falta mesmo é um Outline para fechar de vez.
Template para projetos Symfony:
{
"folders":
[
{
"path": ".",
"folder_exclude_patterns": ["bundles", "assets", "cache"]
<?php
require_once '../config.php';
global $DB;
$DB->set_debug(true);
function desable_enrol($userid,$courseid,$dataInicio,$dataFinal)
{
global $DB, $CFG;
$dataAtual = strtotime('NOW');
@marcelloinfoweb
marcelloinfoweb / cpfCnpj.validate.js
Last active March 12, 2024 13:22
Validar CPF e CNPJ com Jquery e ValidateJS
function isCnpj(cnpj) {
var numeros, digitos, soma, i, resultado, pos, tamanho, digitos_iguais;
if (cnpj.length === 0) {
return false;
}
cnpj = cnpj.replace(/\D+/g, '');
digitos_iguais = 1;
for (i = 0; i < cnpj.length - 1; i++)
if (cnpj.charAt(i) !== cnpj.charAt(i + 1)) {
digitos_iguais = 0;
@marcelloinfoweb
marcelloinfoweb / hosts
Created June 5, 2018 11:39
Bloqueio de Telemetria do Windows 10
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#