Skip to content

Instantly share code, notes, and snippets.

View kreo's full-sized avatar
:electron:
System Failture. Try again🁢

Fabio Cencetti kreo

:electron:
System Failture. Try again🁢
View GitHub Profile
@kreo
kreo / nested_centered_block.html
Last active August 29, 2015 14:21
Nested Centered Block
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Nested Centered Block -- Gist</title>
<style>
html, body {
@kreo
kreo / card_preview_with_center_text.html
Last active August 29, 2015 14:22
Card preview with center text
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Card preview with center text</title>
<style>
*{
box-sizing: border-box;
}
@kreo
kreo / centering-in-the-unknown.html
Created June 1, 2015 15:53
Centering in the Unknown - blocks
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Card preview with center text</title>
<style>
*{
box-sizing: border-box;
}
@kreo
kreo / absolute_center_block.html
Last active August 29, 2015 14:22
absolute center block
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>absolute center block</title>
<style>
*{
margin: 0;
padding: 0;
}
@kreo
kreo / index.html
Last active September 17, 2015 07:53 — forked from hdragomir/index.html
IIFE version of SM Font Loading
<script type="text/javascript">
(function (css_href) {
"use strict";
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
} else if (el.attachEvent) {
el.attachEvent("on" + ev, callback);
@kreo
kreo / sm-annotated.html
Last active September 17, 2015 07:53 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@kreo
kreo / gist:acff04647bb65f063890
Created October 1, 2015 14:14 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# First:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
#go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@kreo
kreo / _color-palette.scss
Created November 13, 2015 04:53 — forked from samuel-holt/_color-palette.scss
Dynamic color palette mixin
// =================================
// Color palette generator
// =================================
// Muck around with colors here:
$primary-color: salmon;
// A global to store the palette(s)
$global-color-palettes: () !global;
@kreo
kreo / caret.scss
Created November 16, 2015 10:04 — forked from zanetaylor/caret.scss
SASS caret mixin
@mixin caret($point, $border-width, $color) {
$opposite: opposite-position($point);
border: $border-width solid transparent;
border-#{$opposite}: $border-width solid $color;
border-#{$point}: 0;
height: 0;
width: 0;
}
@kreo
kreo / SassMeister-input.scss
Created December 1, 2015 11:06 — forked from jlong/SassMeister-input.scss
Navigate a nested maps with map-fetch() in Sass
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
//
// map-fetch($map, $keys)
//
// An easy way to fetch a deep value in a multi-level map. Works much like
// map-get() except that you pass multiple keys as the second parameter to