Skip to content

Instantly share code, notes, and snippets.

View luisfelipe-dev's full-sized avatar
:octocat:
👨🏻‍💻

Luís Felipe de Olivera luisfelipe-dev

:octocat:
👨🏻‍💻
View GitHub Profile
anonymous
anonymous / gist:132124
Created June 18, 2009 18:58
<html>
<head><title>:: jQuery ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
</style>
<body>
<form name="listForm" id="listForm">
<input type="checkbox" name="choice" value="2" />2<br/>
<input type="checkbox" name="choice" value="5" />5<br/>
<input type="checkbox" name="choice" value="10" />10<br/>
@gaelbillon
gaelbillon / gist:3781364
Created September 25, 2012 12:05
log window width & height on resize (paste in console & resize)
window.onresize = function(event) {
console.log("x: " + window.innerWidth+" y: " + window.innerHeight);
}
@derekpcollins
derekpcollins / index.html
Created April 18, 2013 17:42
A CodePen by Derek P. Collins. Content Slider - On Click - Click a section to grow the content. Uses jQuery to set/remove classes on click. Uses CSS for the animation itself. If you click on an expanded section of content it will reset.
<div class="slider">
<div class="slide"></div>
<div class="slide"></div>
<div class="slide"></div>
<div class="slide"></div>
<div class="slide"></div>
</div><!-- .slider -->
@ricardodantas
ricardodantas / validacao+mascara.js
Last active April 30, 2025 12:45
Máscara e validação de RG, CNPJ, CPF, etc...
// JavaScript Document
// adiciona mascara para rg
// Cada estado têm regras e quantidades diferentes de números no registro. Por isso,
// não há uma maneira confiável de fazer a validação do mesmo.
function MascaraRg(v0,errChar='?'){
const v = v0.toUpperCase().replace(/[^\dX]/g,'');
return (v.length==8 || v.length==9)?
v.replace(/^(\d{1,2})(\d{3})(\d{3})([\dX])$/,'$1.$2.$3-$4'):
(errChar+v0)
@murum
murum / gist:47b35085dfb603d56b82
Created October 23, 2015 07:24
Wordpress gulp with PHP browsersync
///// Plugin Includes /////
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
plumber = require('gulp-plumber'),
concat = require('gulp-concat'),
jshint = require('gulp-jshint'),
autoprefixer = require('gulp-autoprefixer'),
browserSync = require('browser-sync'),
reload = browserSync.reload,
sass = require('gulp-sass');
@luisfelipe-dev
luisfelipe-dev / Barra de Rolagem Personalizada
Last active January 22, 2023 14:31
barra de rolagem, scroll
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background-color: #eaeaea;
}
::-webkit-scrollbar-thumb {
background-color: #b0b0b0;
border-radius: 6px;
cursor: pointer;
@helgatheviking
helgatheviking / kia_add_script_to_footer.php
Created February 24, 2017 18:09
Add plus and minus buttons to WooCommerce quantity inputs
@webgurus
webgurus / acf-repeater-pagination.php
Created July 18, 2017 09:29
example on how to paginate an acf repeater image gallery
<?php
/*
* Paginate Advanced Custom Field repeater
*/
if( get_query_var('page') ) {
$page = get_query_var( 'page' );
} else {
$page = 1;
}
@CodeMyUI
CodeMyUI / index.html
Created October 30, 2017 10:33
SVG Gooey Hover Menu Concept
<div id="menu">
<div class="hamburger">
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
</div>
<div class="menu-inner">
<ul>
<li>Menu Item</li>
@khalid32
khalid32 / Convert ISO Date format to dd-mm-yyyy
Created November 28, 2017 03:45
a demonstration to convert toISOString() to dd-mm-yyyy with JavaScript
new Date().toISOString().replace(/T.*/,'').split('-').reverse().join('-')