Skip to content

Instantly share code, notes, and snippets.

View lipelopeslage's full-sized avatar

Felipe Lopes Lage lipelopeslage

View GitHub Profile
@lipelopeslage
lipelopeslage / valida_cor.html
Created September 18, 2015 23:02
Validar cor hexadecimal
<!doctype html>
<html>
<head></head>
<body>
Hexadecimal vai de 0-9 e de A-F,
para ser válido, a conversão de um hexadecimal em inteiro deve
ser entre 0(0) e 255(F).<br>
Para validar o hexadecimal, é preciso checar caractere por caractere.
<div id="formulario">
<!--
@lipelopeslage
lipelopeslage / relogio.html
Created September 18, 2015 12:11
Relógio (setTimeout/setInterval)
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<p id="relogio"></p>
@lipelopeslage
lipelopeslage / tabela.html
Created September 18, 2015 12:10
Tabela + querySelectors
<!doctype html>
<html>
<head></head>
<body>
<script>
// CRIAR UMA TABELA E ADICIONAR NO DOM
// criar tabela com o conteúdo de uma lista
var alunos = [{nome:'Deni', ra:'1420088-1'},
@lipelopeslage
lipelopeslage / style.css
Created September 1, 2014 14:59
estilo
@import "utils.scss";
.joyride-modal-bg{
z-index: 9999;
}
.joyride-tip-guide{
z-index: 10000;
}
algoritmo "lista2_13"
var i,a,s,p:real
inicio
a <- 1
i <- 1
s <- 0
repita
@lipelopeslage
lipelopeslage / gist:5061789
Last active December 14, 2015 08:59
Resolução Ex. 19 - Prof. Chiara FATEC Baixada Santista - Sistemas para Internet
algoritmo "exercicio_19"
var x1, x2, x3, y1, y2, y3, a, b, c, area, perimetro : Real
tipo : caracter
inicio
escreva("Insira o valor de x1: ")
leia(x1)
escreva("Insira o valor de x2: ")
leia(x2)
escreva("Insira o valor de x3: ")
leia(x3)
@lipelopeslage
lipelopeslage / parallax-secret.js
Created November 21, 2012 18:30
My parallax secret
/*########################################################################*/
/*###### using jQuery selector for a fast/cross-browser resolution #######*/
/*########################################################################*/
var totalAreas = 6, // this value is obviously arbitrary
winH = $(window).height, // the window height
top = $(window).scrollTop(), // the current scroll value
maxScroll = $(document).height() - winH, // the maximum scroll value
scrollPerc = top/maxScroll, // the current scroll percentage
areaPercent = 0; // init variable