Skip to content

Instantly share code, notes, and snippets.

View saibayadon's full-sized avatar
💯

Bruno Lazzaro saibayadon

💯
View GitHub Profile
/**
* Sum of all elements including nested arrays.
*
* by Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
* MIT Style License
*/
[1, 2, [3, 4], 5, [6, [7, 8]]].reduce(function collect(previous, current) {
return (
(Array.isArray(previous) ? previous.reduce(collect) : previous) +
@vctrfrnndz
vctrfrnndz / gist:6526989.less
Last active December 22, 2015 20:29
Ultimate grid mixin
// Group class for clearing floats
.group {
&:before,
&:after {
content: " ";
display: table;
}
&:after {
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),