Skip to content

Instantly share code, notes, and snippets.

@noeldelgado
noeldelgado / index.js
Last active July 27, 2016 03:15
requirebin sketch
var Gemini = require('gemini-scrollbar');
new Gemini({
element: document.querySelector('.scroller-a')
}).create();
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Neonode</title>
<link rel="icon" type="image/gif" href="/images/favicon.gif" />
<link rel="stylesheet" href="/build/stylesheets/layout-name.css">
</head>
<body>
<main class="container">
@noeldelgado
noeldelgado / index.js
Created May 5, 2016 17:52
requirebin sketch
var Gemini = require('gemini-scrollbar');
var A = new Gemini({
element: document.querySelector('.scroller-a')
}).create();
var B = new Gemini({
element: document.querySelector('.scroller-b')
}).create();
@noeldelgado
noeldelgado / github-graph-colours-changer.js
Last active March 8, 2020 23:05
Copy and paste the code on your github profile page to change the graph colours... (DevTools » Console)
// var GH = ['#EEEEEE', '#D6E685', '#8CC665', '#44A340', '#1E6823']; /* previous GH colors */
var GH = ['#EBEDF0', '#C6E48B', '#7BC96F', '#239A3B', '#196127'];
var CO = ['#EF4B4D', '#F89B47', '#FAEA20', '#7DC242', '#5D94CE', '#855CA7'];
var graph = document.getElementsByClassName('js-calendar-graph-svg')[0];
var days = [].slice.call(graph.getElementsByTagName('rect'), 0);
days.forEach(function(rect) {
switch(rect.getAttribute('fill').toUpperCase()) {
case GH[0]: rect.setAttribute('fill', CO[2]); break; // yellow
@noeldelgado
noeldelgado / _font-face-mixin.scss
Last active July 18, 2017 14:51
Sass Mixin: font-face
@mixin font-face($name, $files, $eot: false, $weight: false, $style: false) {
$name: quote($name);
@font-face {
font-family: $name;
@if $eot {
src: url($eot);
$files: join("#{$eot}", $files);
}
src: add-font-format($files, $name);
@if $weight {

Keybase proof

I hereby claim:

  • I am noeldelgado on github.
  • I am noeldelgado (https://keybase.io/noeldelgado) on keybase.
  • I have a public key whose fingerprint is C40F C2CD 2F62 0FE4 B92E 7A87 8ADA 2558 4608 B182

To claim this, I am signing this object:

@noeldelgado
noeldelgado / gist:7095622
Last active December 26, 2015 04:49
Compiled HTML and CSS of this pen http://codepen.io/noeldelgado/pen/pGwFx
<header>
<div class="container">
<h1>Direction-aware hover effect</h1>
<p>CSS &amp; bits of JS</p>
</div>
</header>
<div class="container">
<ul>
<li>
var orderByHSL = function( x, y ) {
var hslx, hsly;
var pad = function(value) {
var l = value.length;
while (l < 3) {
l += 1;
value = "0" + value;
}
return value;
};
@noeldelgado
noeldelgado / Exact # Rows an Columns
Created April 17, 2013 16:13
Calculate the exact number of rows and columns for N number of items
var N = 216, // total number of items
rows = Math.floor( Math.sqrt( N ) ),
columns = 0;
while ( N % rows != 0 ) {
rows = rows - 1;
}
columns = N / rows;
@noeldelgado
noeldelgado / safewebcolors
Last active December 15, 2015 21:49
generates an array with the full list of safe-web-colours
var colors = [],
pattern = ["0","3","6","9","c","f"],
plength = pattern.length,
a, b, c;
for (a = 0; a < plength; a += 1) {
for (b = 0; b < plength; b += 1) {
for (c = 0; c < plength; c += 1) {
colors.push( pattern[a]+pattern[a] + pattern[b]+pattern[b] + pattern[c]+pattern[c] );
}