Skip to content

Instantly share code, notes, and snippets.

View renatocarvalho's full-sized avatar
💭
🤘✨

Renato Carvalho renatocarvalho

💭
🤘✨
View GitHub Profile
@boriskaiser
boriskaiser / gist:3908158
Created October 17, 2012 21:02
Easy retina-ready images using SCSS + Compass
@mixin 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){
@include handhelds {
table.responsive {
width: 100%;
thead {
display: none;
}
tr {
display: block;
}
td, th {
@ryanburnette
ryanburnette / slim-html5-boilerplate-ish
Last active January 1, 2016 20:48 — forked from blakehilscher/slim-html5-boilerplate
It's HTML5 Boilerplate(ish) ... in Slim.
doctype html
html.no-js
head
meta charset="utf-8"
meta content="IE=edge" http-equiv="X-UA-Compatible"
title Title
meta content="width=device-width,initial-scale=1" name="viewport"
@kneath
kneath / _README.md
Created November 18, 2009 21:42 — forked from defunkt/bundle.rake
Intelligent asset bundling for Rails (GitHub's asset bundling)

GitHub Javascript Strategy

Unless otherwise necessary (such as mobile development), the GitHub javascript codebase is based off jQuery. You can safely assume it will be included on every page.

File naming

  • All jquery plugins should be prefixed with jquery, such as jquery.facebox
  • All github-specific jquery plugins should be prefixed with jquery.github. Like jquery.github.repo_list.js
  • All page-specific files (that only run on ONE page) should be prefixed with page. page.billing.js
@runspired
runspired / ember-recipes.md
Last active August 11, 2016 02:46
ember-recipes

#Ember Recipes

Recipes should be tested.

  • Having tested recipes helps make ensure they still work with new versions of Ember.
  • It helps document how you should test a feature in your app.
  • It would enable us (or someone else) to build walk through test-driven tutorials for common Ember patterns and needs.

Recipes should be self-documenting

@jmwhittaker
jmwhittaker / gist:847243
Created February 28, 2011 12:16
Border-image CSS3 Mixin for Compass & SASS
/* Mixin for Compass - border-image
$border-image([$image-url], [$offsets], [$repeats])
Example:
@include border-image(url(../my_image.png), 10, stretch)
@include border-image(url(../my_image.png), 10 5 10 5, stretch repeat)
---------------------------------------- */
@mixin border-image($url, $offsets, $repeats) {
@dfadler
dfadler / get-sprite.sass
Created July 13, 2012 15:05
A SASS mixin for generating a sprite declaration block that will work with media queries
// http://compass-style.org/reference/compass/helpers/sprites/
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true)
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file
$sprite-image: sprite-file($map, $sprite)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url
$sprite-map: sprite-url($map)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position
@magsout
magsout / head.html
Last active June 19, 2018 13:07
Minimum Web App <head> configuration
<!DOCTYPE html>
<html lang="fr" manifest="/manifeste.appcache">
<head>
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta charset="UTF-8">
<!-- Meta SEO -->
<title>Web App</title>
<meta name="author" content="author">
<meta name="description" content="Description">
<!-- RWD -->
@renatocarvalho
renatocarvalho / template.rb
Last active September 5, 2018 07:51 — forked from julioprotzek/template.rb
Rails App template to create a custom rails app. Just run on terminal: rails new myrailsapp -T -m https://gist.github.com/renatocarvalho/5147512/raw/
remove_file 'Gemfile'
create_file 'Gemfile'
add_source "https://rubygems.org"
gem 'rails', '~> 3.2.12'
if yes?('PostgreSQL on development?')
gem 'pg'