Skip to content

Instantly share code, notes, and snippets.

View nucliweb's full-sized avatar
⚡
Debugging…

Joan León nucliweb

⚡
Debugging…
View GitHub Profile
@nucliweb
nucliweb / markdown.css
Last active November 26, 2015 20:44 — forked from imjasonh/markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@nucliweb
nucliweb / console.profile.js
Created April 13, 2015 22:06
console.profile()
Chrome dev tools tip of the day: use console.profile() and a timeout to gather stats at particular points in your code. For example, a hamburger menu opening.
onClick: function() {
console.profile('Hamburger Open');
setTimeout(function() {
console.profileEnd('Hamburger Open');
}, 1000);
// Do some stuff
}
@nucliweb
nucliweb / getLuminance.js
Last active December 5, 2015 01:45
getLuminance of hexColor
/*
return luminance of hexColor
Joan Leon | @nucliweb
*/
function getLuminance (hexColor) {
var r, g, b, d ,h, minRGB, maxRGB,
computedH = 0,
computedS = 0,
computedV = 0;
@nucliweb
nucliweb / konami-code.js
Created February 26, 2015 14:43
Konami Code
var aKeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
$(document).keydown(function(e) {
aKeys.push( e.keyCode );
if ( aKkeys.toString().indexOf( konami ) >= 0 ) {
$(document).unbind('keydown',arguments.callee);
@nucliweb
nucliweb / Sass-Frameworks.md
Last active November 5, 2019 14:24
Sass Frameworks
@nucliweb
nucliweb / SassMeister-input-HTML.html
Created February 24, 2015 15:49
Generated by SassMeister.com.
<ul class="list-bullet-icon">
<li class="lolo iconfont-A">a</li>
<li>b</li>
</ul>
@nucliweb
nucliweb / SelectoresCSS.md
Last active November 20, 2020 19:37
Selectores CSS
@nucliweb
nucliweb / Image Loader
Created February 16, 2015 22:16
Image Loader
http://qnimate.com/lazy-loading-images-and-its-seo-impact/
https://github.com/easy-designs/easy-lazy-images.js
https://github.com/qnimate/Qazy
http://www.appelsiini.net/projects/lazyload
http://luis-almeida.github.io/unveil/
http://www.createjs.com/#!/PreloadJS
http://imagesloaded.desandro.com/
@nucliweb
nucliweb / Git.md
Last active July 29, 2016 16:31
Git Tips

Git notes

git init                          <-- Create repo

git add .                         <-- Add change to
git commit -m "Message"          <-- Commit to repo
git commit -m "Message" <files>  <-- Commit to repo
git commit -am "Message"         <-- Add files & Commit to repo
git commit -a --amend             <-- Add change to Commit, option to change de description of Commit
@nucliweb
nucliweb / gist:5910ffd220008095fa87
Created January 26, 2015 21:47
Javascript: Convert arguments to Array
function myFn(/* any number of arguments */) {
var args = Array.prototype.slice.call(arguments);
// or [].slice.call(arguments)
args.forEach(function(arg) {
// do something with args here
});
}