Skip to content

Instantly share code, notes, and snippets.

View Renatodeluna's full-sized avatar
🚀

Renato de Luna Renatodeluna

🚀
View GitHub Profile
@Renatodeluna
Renatodeluna / Exemplo_svgSprite.html
Last active December 11, 2019 18:32
SVG Sprite
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Exemplo SVG</title>
<style>
svg:not(:root) {
@Renatodeluna
Renatodeluna / Array Random
Created June 21, 2015 04:25
Create array random
var array = [ 'Bom Dia', 'Boa Noite', 'Boa Tarde'],
posicao = Math.floor(array.length * Math.random()),
texto = array[posicao];
console.log(texto);
@Renatodeluna
Renatodeluna / Gruntfile.js
Created November 4, 2013 16:56
Rodando a task connect e watch juntos
module.exports = function (grunt) {
'user strict';
// Configurando Tarefas
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Inicia um server estático
connect: {
server: {
module.exports = function (grunt) {
'user strict';
// Configurando Tarefas
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Inicia um server estático
connect: {
server: {
var dialog = document.createElement('div'),
ie6Launch = 2001,
ie7Launch = 2006,
currentYear = new Date().getFullYear(),
ieVersion = head.browser.version,
timeAgo = ieVersion <= 6 ? currentYear - ie6Launch : currentYear - ie7Launch;
dialog.className = 'dialog-fixed browsers';
dialog.innerHTML = '\
<div class="out-box"> \
@Renatodeluna
Renatodeluna / Arrow Css
Last active December 14, 2015 10:09
Seta de indicação com CSS - CrossBrowser
#arrow{
float:left;
margin:0 1px 0 0;
width:0;
height:0;
border-width:10px 0px 10px 20px;
border-style:solid;
border-color:transparent;
border-left-color:#000;
display:block;
.video {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
overflow: hidden;
}
.video > iframe,
.video > object,
.video > embed{