Skip to content

Instantly share code, notes, and snippets.

View nucliweb's full-sized avatar

Joan León nucliweb

View GitHub Profile
@nucliweb
nucliweb / meta-tags.md
Created April 3, 2020 07:07 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@nucliweb
nucliweb / index.html
Created October 19, 2018 07:30 — forked from yuanchuan/index.html
Alien land
<css-doodle>
:doodle {
@grid: 20x1 / 60vmin;
overflow: hidden;
}
:container {
transform: scale(25);
filter: @svg-filter(<svg>
<filter>
<feTurbulence baseFrequency="@r(.016, .056, .001)" seed="@r(100)" numOctaves="@r(8, 15)" />
@nucliweb
nucliweb / getAverageColourAsRGB.js
Created January 21, 2018 13:46 — forked from olvado/getAverageColourAsRGB.js
Get the average colour of an image in javascript using getImageData in CANVAS
function getAverageColourAsRGB (img) {
var canvas = document.createElement('canvas'),
context = canvas.getContext && canvas.getContext('2d'),
rgb = {r:102,g:102,b:102}, // Set a base colour as a fallback for non-compliant browsers
pixelInterval = 5, // Rather than inspect every single pixel in the image inspect every 5th pixel
count = 0,
i = -4,
data, length;
// return the base colour for non-compliant browsers
@nucliweb
nucliweb / easings.js
Created October 5, 2017 23:12 — forked from rezoner/easings.js
One argument easing equations
/*
A full list of simple easing equations inspired by GIST from greweb - https://gist.github.com/gre/1650294
Equations source - http://gsgd.co.uk/sandbox/jquery/easing/
*/
{
linear: function(t) {
return t
},
inQuad: function(t) {
@nucliweb
nucliweb / webpack.hjs.js
Created August 4, 2016 09:08 — forked from carlosvillu/webpack.hjs.js
La configuración de webpack definitiva
const webpack = require('webpack')
const getConfig = require('hjs-webpack')
const isDev = (process.env.NODE_ENV || 'development') === 'development'
const isProd = !isDev && process.env.NODE_ENV === 'production'
const PRO_PUBLIC_PATH = ''
const DEV_PUBLIC_PATH = ''
const PUBLIC_PATH = isProd ? PRO_PUBLIC_PATH : DEV_PUBLIC_PATH
const GA_ID = 'UA-XXXXX-Y'
@nucliweb
nucliweb / notes.md
Created July 14, 2016 16:47 — forked from klamping/notes.md
Visual Regression Testing Resources
@nucliweb
nucliweb / js-terms.md
Created January 24, 2016 09:13 — forked from AllThingsSmitty/js-terms.md
10 terms to help you better understand JavaScript

10 JavaScript Terms You Should Know

From currying to closures there are quite a number of special words used in JavaScript. These will not only help you increase your vocabulary but also better understand JavaScript. Special terms are normally found in documentation and technical articles. But some of them like closures are pretty standard things to know about. Knowing what the word itself means can help you know the concept it's named for better.

  1. Arity
  2. Anonymous
  3. Closure
  4. Currying
  5. Hoisting
  6. Mutation
@nucliweb
nucliweb / toggle-css-script-on-off.js
Created January 24, 2016 08:35 — forked from AllThingsSmitty/toggle-css-script-on-off.js
Disable/enable a stylesheet or script
// Use the Boolean `disabled` attribute
myCSS.disabled = true;
myJS.disabled = true;
// Create a stylesheet toggle button:
var stylesheet = document.getElementById('boot'),
btn = document.querySelector('.btn');
btn.addEventListener('click', function () {
stylesheet.disabled = (stylesheet.disabled === false) ? true : false;