Skip to content

Instantly share code, notes, and snippets.

🐙
Growing a beard

Gonçalo Morais gnclmorais

🐙
Growing a beard
Block or report user

Report or block gnclmorais

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View high-dpi-media.css
/* ---------------------------------------------------------- */
/* */
/* 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 */
@gnclmorais
gnclmorais / gifify.sh
Created Jun 13, 2014
Concatenates a bunch of sequencial pictures into a transitional .gif file
View gifify.sh
#!/bin/sh
#
# Grabs all .png files in a folder and concatenates them into a .gif file
#
# Options:
# -delay Delay between images in centisecond
convert -delay 75 *.png result.gif
View .zshrc
# for golang
# mkdir $HOME/go
# mkdir -p $GOPATH/src/github.com/user
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
View 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

View _baseline.scss
// 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.
View readme.md

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
View 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}
*/
View osx-10-10-virtualbox.md

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.)

View dabblet.css
/**
* Article preview
*/
/* Google Fonts */
@import url(http://fonts.googleapis.com/css?family=Dosis);
p {
font-family: 'Dosis', sans-serif;
padding: 0px 40px 20px 40px;
@gnclmorais
gnclmorais / dabblet.css
Created Apr 5, 2012
CSS3 Orbital Avatar
View dabblet.css
/**
* CSS3 Orbital Avatar
*/
.demo {
position: absolute;
top: 150px;
right: 200px;
}
You can’t perform that action at this time.