Skip to content

Instantly share code, notes, and snippets.

View erin-dot-io's full-sized avatar

Erin Keeffe erin-dot-io

View GitHub Profile
@erin-dot-io
erin-dot-io / markdown_helper.rb
Last active May 16, 2017 14:01
Markdown helper & parser for Middleman apps
# I use this in conjunction with Contentful CMS to render blocks of markdown into my static middleman templates.
# In your gemfile, add Redcarpet:
gem 'redcarpet'
# ...and do a bundle install
# In your config.rb, add this line:
set :markdown_engine, :redcarpet
@erin-dot-io
erin-dot-io / resizer_bookmarklet.js
Created September 24, 2014 19:15
iPhone 6 Viewport Resizer Bookmarklet
javascript:void((function(d){if(self!=top||d.getElementById('toolbar')&&d.getElementById('toolbar').getAttribute('data-resizer'))return false;d.write('<!DOCTYPE HTML><html style="opacity:0;"><head><meta charset="utf-8"></head><body><a data-viewport="320x480" data-icon="mobile" title="Mobile (e.g. Apple iPhone)">Mobile (e.g. Apple iPhone)</a><a data-viewport="320x568" data-icon="mobile" data-version="5" title="Apple iPhone 5">Apple iPhone 5</a><a data-viewport="375x667" data-icon="mobile" data-version="6" title="Apple iPhone 6">Apple iPhone 6</a><a data-viewport="414x736" data-icon="mobile" data-version="6+" title="Apple iPhone 6 Plus">Apple iPhone 6 Plus</a><a data-viewport="768x1024" data-icon="tablet" title="Tablet (iPad 2-3rd, mini)">Tablet (iPad 2-3rd, mini)</a><a data-viewport="1366x583" data-icon="notebook" data-version="11" title="Macbook Air 11-inch (Viewable Area)">Macbook Air 11-inch (Viewable Area)</a><a data-viewport="1440x715" data-icon="notebook" data-version="13" title="Macbook Air 13-inch (Vie
@erin-dot-io
erin-dot-io / _mixins.css.scss
Last active August 29, 2015 14:10
Boilerplate Mixins
// cross-browser font rendering
@mixin font-smoothing($value: on) {
@if $value == on {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@else if $value == off {
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: auto;
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}
@erin-dot-io
erin-dot-io / placeholder.scss
Created April 1, 2015 01:03
Placeholder text css styling for form elements
//placeholder colors
$placeholder-color : #aaa;
$placeholder-color-focus : #ccc;
// Placeholder CSS. Requires Bourbon (bourbon.io)
input {
@include placeholder {color: $placeholder-color;}
&:focus {
&::-webkit-input-placeholder {color: $placeholder-color-focus;}
&:-moz-placeholder {color: $placeholder-color-focus;}
&::-moz-placeholder {color: $placeholder-color-focus;}
@erin-dot-io
erin-dot-io / img-align.scss
Last active August 29, 2015 14:18
Remove white space below image (<img>) tags
// Inline elements leave space for decenders in text strings (ex: g, q, j, p)
// Use this rule to remove the decender white space for image tags:
img {
vertical-align: bottom;
}
@erin-dot-io
erin-dot-io / new-computer.bash
Last active May 18, 2022 20:59
Essential bash commands to fix key repeat style and speed.
# Increase key repeat speed
$ defaults write NSGlobalDomain KeyRepeat -int 1.8
# Disable character accent menu when holding down certain keys
$ defaults write -g ApplePressAndHoldEnabled -bool false
@erin-dot-io
erin-dot-io / icomoon-base.scss
Created April 21, 2015 16:03
Custom IcoMoon base styles
/* Move base font icon styles onto :before in order to
avoid affecting text styles on the parent element */
[class^="icon-"], [class*=" icon-"] {
&:before {
font-family: 'su-icons';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
@erin-dot-io
erin-dot-io / viewport.html
Created April 23, 2015 21:04
Boilerplate Viewport Settings
<!--For fully responsive sites with user zooming disabled-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
@erin-dot-io
erin-dot-io / share-urls.md
Last active April 20, 2016 23:30
Custom share service URLs

Twitter

http://twitter.com/intent/tweet?text=[TITLE]&url=[URL]&hashtags=[TAG,TAG]&via=[USERNAME]&related=[twitter%3ATwitter%20News,twitterapi%3ATwitter%20API%20News] [more options]

Pinterest

http://pinterest.com/pin/create/button/?url={URI-encoded URL of the page to pin}&media={URI-encoded URL of the image to pin}&description={optional URI-encoded description}

Pinterest (custom image):