Skip to content

Instantly share code, notes, and snippets.

@5eleven
5eleven / retina-mixin.scss
Created April 5, 2013 22:53
SCSS Retina Images Mixin Example
//Example Mixin
@mixin image-2x($image, $width, $height) {
@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) {
/* on retina, use image that's scaled by 2 */
background-image: url($image);
background-size: $width $height;
@5eleven
5eleven / ruby-gmail.rb
Created April 1, 2013 02:12
Integrates gmail with Ruby
require "net/smtp"
require "time" # for rfc2822
# sender
from_addr = "insert_from_address_here"
# receiver
to_addr = "insert_receiver_address_here"
mail_content = <<END_OF_CONTENT
From: #{from_addr}
@5eleven
5eleven / .zshrc
Last active December 10, 2015 13:28
Fix ZSH rake parameter issue on Mac
# go into the directory where .zshrc is located. Usually ~
cd /Users/YourUserName
# open .zshrc file
vi .zshrc
# add this line to end of .zshrc
alias rake='noglob rake'
@5eleven
5eleven / Sass
Created December 14, 2012 02:50
Random Sass commands.
# Convert CSS to SCSS
$ sass-convert style.css style.scss
# Convert Sass to SCSS
$ sass-convert style.sass style.scss
# Convert SCSS to Sass
$ sass-convert style.scss style.sass
@5eleven
5eleven / launch_sublime_from_terminal.markdown
Created December 10, 2012 22:59 — forked from artero/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@5eleven
5eleven / retinamq.css
Created December 6, 2012 18:18
Retina Media Queries
@media (min--moz-device-pixel-ratio: 1.5),
(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi),
(min-resolution: 1.5dppx) {
/* Muthafuken Retina! */
}
@5eleven
5eleven / config.rb
Created November 2, 2012 21:35
My Default Compass Settings
http_path = "/"
css_dir = "/"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"
output_style = :compressed
line_comments = false
asset_cache_buster :none
@5eleven
5eleven / mq.css
Created October 3, 2012 18:29 — forked from chriscoyier/mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@5eleven
5eleven / .gitignore
Created September 28, 2012 05:01 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@5eleven
5eleven / .gitignore
Created September 28, 2012 04:57
.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #