Skip to content

Instantly share code, notes, and snippets.

View gnclmorais's full-sized avatar
🐙
Growing a beard

Gonçalo Morais gnclmorais

🐙
Growing a beard
View GitHub Profile
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
# for golang
# mkdir $HOME/go
# mkdir -p $GOPATH/src/github.com/user
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
@gnclmorais
gnclmorais / README.md
Last active August 29, 2015 14:07 — forked from addyosmani/README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

// Set up line-height and colour defaults for this mixin.
$line-height: 20px!default;
$line-color: #94d4ff!default;
/**
*
* Baseline Mixin
* Handy dandy mixin to provide a baseline for your typography.
*
* The mixin carries two arguments — the $baseline, which should match your line-height, and $baseline-color, the colour you want the lines to be.

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@gnclmorais
gnclmorais / bind.js
Last active August 29, 2015 14:11 — forked from Couto/bind.js
/**
* bind
* Takes a function and returns a new one that will always have a particular context.
* If arguments are given, curry will happen: http://ejohn.org/blog/partial-functions-in-javascript/
*
* @param {Function} fn Function whose context will be changed
* @param {Object} [ctx=this] the obejct to which the context will be set
* @param {Mixed} [args...] Arguments to be passed to the resulting function
* @returns {Function}
*/

Install OS X 10.10 Yosemite in VirtualBox

(based on this pastebin i've found via Google, markdownified and adjusted to work with the official Yosemite release)

Yosemite's first developer preview was released right after Monday's WWDC opening keynote. For the general public, an open beta will be available to download later this summer. However, for those who want a sneak peek at the new hotness, there is a way to safely install it without risking your machine, using the free and powerful VirtualBox application from Oracle.

(LEGAL DISCLAIMER: This guide aims to explain how to create a virtual machine on a regularly purchased Apple computer, running a genuine Mac OS X operating system, for testing purposes only.)

@gnclmorais
gnclmorais / dabblet.css
Created April 19, 2012 15:48 — forked from LeaVerou/dabblet.css
Vertical centering with Flexbox + margin fallback
/**
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
*/
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
@gnclmorais
gnclmorais / dabblet.css
Created May 7, 2012 16:29 — forked from jackie/dabblet.css
FizzBuzz with CSS
/**
* FizzBuzz with CSS
*/
body {
counter-reset: fizzbuzz;
}
div {
@gnclmorais
gnclmorais / dabblet.html
Created July 16, 2012 08:51 — forked from dstorey/dabblet.css
Untitled
<h1>Split view feature box with CSS skew transform and transitions</h1>
<div class="box sunrise"><a href="#box2"></a></div>
<div class="slider">
<div class="box sunset"><a href="#box1"></a></div>
</div>
<footer>
<p>Handcrafted by <a href="http://www.twitter.com/dstorey">@dstorey</a> for
<a href="http://www.generatedcontent.org/123456/split-feature">GeneratedContent.org</a>. Sunset image, <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">Some rights reserved</a> by <a href="http://www.flickr.com/photos/42429527@N03/">najeebkhan2009</a>. Sunrise image, <a href="http://creativecommons.org/licenses/by-nd/2.0/">Some rights reserved</a> by <a href="http://www.flickr.com/photos/petehogan/">3dpete</a>.</p>
</footer>