Skip to content

Instantly share code, notes, and snippets.


Renato Carvalho renatocarvalho

View GitHub Profile
renatocarvalho /
Last active Dec 31, 2017 — forked from barnes7td/
Sublime Terminal Setup on Mac

Setup Terminal for Sublime Shorcut "subl":

Open terminal and type:

1. Create a directory at ~/bin:

mkdir ~/bin

2. Copy Sublime executable to your ~/bin directory:

View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier

I'm planning on either writing this up in detail or maybe doing a screencast about screencasting, but I'll give a short version here.

On sound quality:

This matters a lot. In decreasing order of importance:

  1. Remove echo. You have to hear this to understand. Set up a mic in front of your mouth and record a sentence. Then, put a thick comforter over you and the mic and say it again at the same distance. Listen to
View gist:6747673

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
View sitemap.xml.builder
# encoding: utf-8
# Drop this file in your source directory
# Uses the builder gem.
# Add
# gem 'builder', '~> 2.0'
# to the Gemfile, and run builder install
View gist:5923508

This was tested using Ruby 2.0.0 and Rails 4.0.0.rc1.


  1. Set the install directory for Bower components:

    // .bowerrc

"directory": "app/assets/components"

renatocarvalho / template.rb
Last active Sep 5, 2018 — forked from julioprotzek/template.rb
Rails App template to create a custom rails app. Just run on terminal: rails new myrailsapp -T -m
View template.rb
remove_file 'Gemfile'
create_file 'Gemfile'
add_source ""
gem 'rails', '~> 3.2.12'
if yes?('PostgreSQL on development?')
gem 'pg'
View retina-mixin.sass
// Mixin: Automaticamente escreve
// USO:
// +background-2x(logo)
// Com imagem jpg:
// +background-2x(logo,jpg)
// Obs: Obrigatório ter a imagem normal e retina no mesmo diretório - "imagem.png" e "imagem@2x.png"
// #logo {
renatocarvalho / gist:4250910
Created Dec 10, 2012 — forked from boriskaiser/gist:3908158
Easy retina-ready images using SASS + Compass
View gist:4250910
=background-2x($background, $file: 'png')
$image: #{$background+"."+$file}
$image2x: #{$background+"@2x."+$file}
background: image-url($image) no-repeat
@media (min--moz-device-pixel-ratio: 1.3),(-o-min-device-pixel-ratio: 2.6/2),(-webkit-min-device-pixel-ratio: 1.3),(min-device-pixel-ratio: 1.3),(min-resolution: 1.3dppx)
background-image: image-url($image2x)
background-size: image-width($image) image-height($image)
// usage for „logo.png” + „logo2x.png”
renatocarvalho / dabblet.css
Created Sep 19, 2012 — forked from Daniel-Hug/dabblet.css
A "deeper" indented text effect with the :before and :after pseudo-elements.
View dabblet.css
* A "deeper" indented text effect with the :before and :after pseudo-elements.
html, body {
height: 100%;
body {
margin: 0;