Skip to content

Instantly share code, notes, and snippets.

Joan León nucliweb

Block or report user

Report or block nucliweb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nucliweb
nucliweb / Image-Video-Optimization.md
Last active Sep 21, 2019
Twitter accounts you should follow if you like Image & Video Optimization
View Image-Video-Optimization.md
@nucliweb
nucliweb / OSX-disable-shadow-screenshot.md
Created Aug 29, 2019
disable the shadow added when capturing an entire window
View OSX-disable-shadow-screenshot.md

Disable the shadow

You can disable the shadow added when capturing an entire window by executing the following command from the Terminal:

defaults write com.apple.screencapture disable-shadow -bool TRUE; killall SystemUIServer

Enable the shadow

View index.html
<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 / Hello-World.java
Created Jul 4, 2018
Code for "Aprender a programar con Processing y P5js" post
View Hello-World.java
// Imprimir Hello, Works! en Java
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
@nucliweb
nucliweb / Optimizacion-Imagenes.md
Last active May 11, 2018
Temario para un curso de Optimización de imágenes para la web
View Optimizacion-Imagenes.md

Optimización de imágenes para la web

Sesión en abierto

Las imágenes representan más de un 60% del contenido del tráfico web. Desde los inicios de internet las hemos tenido presentes, lo curioso es que año tras año el porcentaje y peso está creciendo.

Mantener una buena optimización de las imágenes nos permitirá mejorar la experiencia de usuario.


View dabblet.css
:root {
--color: purple;
}
:root .cell {
--color: rebeccapurple;
}
html body section p.cell {
--color: red;
@nucliweb
nucliweb / getAverageColourAsRGB.js
Created Jan 21, 2018 — forked from olvado/getAverageColourAsRGB.js
Get the average colour of an image in javascript using getImageData in CANVAS
View getAverageColourAsRGB.js
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
You can’t perform that action at this time.