Skip to content

Instantly share code, notes, and snippets.

@rpullinger
rpullinger / index.html
Last active December 15, 2015 23:08
Responsive images in any aspect ratio
<div class="keep-square">
<div class="image-container">
<img class="content" src="http://www.placehold.it/300x200" alt="Image of Test" />
</div>
</div>
<div class="keep-square">
<div class="image-container">
<img class="content" src="http://www.placehold.it/200x300" alt="Image of Test" />
</div>
@rpullinger
rpullinger / helpful-git-stuff.md
Last active December 17, 2015 19:39
Some helpful stuff for Git

Initial Setup

Theses are things that you run once. The log format and PS1 are my personal preferences so may need changing up for your needs.

Colors in git ui

git config --global color.ui true

Make git log prettier

git config --global format.pretty "%C(white dim) %h %C(yellow) %ar %C(cyan) %an %Creset %s"
@rpullinger
rpullinger / gulpfile.js
Created March 7, 2014 16:44
Simple gulp starter
// Init npm if not already
npm init
// Install gulp and plugins
npm install gulp gulp-ruby-sass gulp-autoprefixer gulp-minify-css gulp-jshint gulp-uglify gulp-rename gulp-clean gulp-concat gulp-notify gulp-cache gulp-livereload tiny-lr --save
// Gulp!
gulp styles
gulp js
gulp watch
/*------------------------------------*\
MEDIA QUERIES
\*------------------------------------*/
/**
* Wraps the content in a min width media query
*
`@include breakpoint(200px){
.example{
font-size: 20px;
@rpullinger
rpullinger / SassMeister-input-HTML.html
Created April 27, 2014 22:51
Generated by SassMeister.com.
<div class="g">
<div class="gi one-half">one-half</div>
<div class="gi one-half">one-half</div>
<div class="gi one-quarter">one-quarter</div>
<div class="gi one-quarter">one-quarter</div>
<div class="gi one-quarter">one-quarter</div>
<div class="gi one-quarter">one-quarter</div>
<div class="gi">1</div>
<div class="gi">1</div>
<div class="gi">1</div>
@rpullinger
rpullinger / SassMeister-input-HTML.html
Created April 28, 2014 14:32
Generated by SassMeister.com.
<div class="g">
<div class="gi one-half">one-half</div>
<div class="gi one-half">one-half</div>
<div class="gi one-quarter">one-quarter</div>
<div class="gi one-quarter">one-quarter</div>
<div class="gi one-quarter">one-quarter</div>
<div class="gi one-quarter">one-quarter</div>
<div class="gi one-quarter">one-quarter</div>
</div>
@rpullinger
rpullinger / SassMeister-input.scss
Created May 16, 2014 14:57
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
$breakpoints: (
start: 0,
first: (640 / 16) * 1em,
second: (800 / 16) * 1em,
third: (1024 / 16) * 1em
@rpullinger
rpullinger / styleguide.html
Created November 24, 2014 14:27
Styleguide
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Style Guide</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body class="styleguide">
// Skip to content
.skip-to-content{
position: absolute;
clip: rect(1px, 1px, 1px, 1px);
opacity: 0;
transition: opacity 0.2s;
&:focus{
position: static;
clip: auto;
@rpullinger
rpullinger / japan
Last active August 29, 2015 14:13
Japan
Apr 1st - Apr 14th
# General
Trains timetabling - http://www.hyperdia.com/
# Tokyo
- SHINJUKU GYOEN - Cherry blossom
- Ittineries - http://www.japan-guide.com/e/e3051.html
- Tsukiji Fish Market
- Kamakura (Giant Budda)