Skip to content

Instantly share code, notes, and snippets.


Phil LaPier plapier

View GitHub Profile
plapier / Typekit font mixin.scss
Created Oct 31, 2012
Sass Mixin for typekit variation-specific font-family names
View Typekit font mixin.scss
Sass Mixin for typekit variation-specific font-family names
Typekit IE6-8 Support (
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
// Must include fallbacks for EACH typekit font — set them each as variables
$typekit-fonts: "source-sans-pro", "ff-tisa-web-pro"; // index [1, 2]
plapier / LaunchStarter.swift
Created May 23, 2015
Add Login item using Launch Services (Shared List File) in Swift
View LaunchStarter.swift
// toggleLaunchAtStartup.swift
// Recents
// Created by Phil LaPier on 5/21/15.
// Copyright (c) 2015 Philip LaPier. All rights reserved.
// With help from:
import Foundation
plapier / ellipsis.scss
Created Feb 14, 2013
Sass Ellipsis Mixin
View ellipsis.scss
@mixin ellipsis ($max-width){
display: inline-block;
max-width: $max-width;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
plapier / gist:4088995
Created Nov 16, 2012
Rails for Designers Cheat Sheet
View gist:4088995


####Generate a controller and action

rails generate controller <controller name> <action>

####Change layout for entire Controller

class ProductsController < ApplicationController
  layout "inventory"
$ = jQuery
class Modal
constructor: (@modal) ->
show: ->
plapier / js2coffeescript.rb
Last active Dec 14, 2015
Convert Javascript to CoffeeScript (vice versa) directly from vim. Uses js2coffee library.
View js2coffeescript.rb
#!/usr/bin/env ruby
require 'tempfile'
file =['js2coffee', '.js'])
file.write # write vim selection to tmp file
puts `js2coffee #{file.path}` # requires js2coffee
file.unlink # deletes the temp file
View _animation.scss
// Fadein
%animation-fadein {
@include animation(fadein 0.1s);
@mixin fadein {
0% {
opacity: 0;
100% {
View ms-gradient.scss
@mixin my-linear-gradient($color1, $color2) {
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#{$color1}', endColorstr='#{$color1}');
@include linear-gradient($color1, $color2); // linear-gradient
// Usage
@include my-linear-gradient(red, orange);
plapier / gist:2044437
Created Mar 15, 2012
CSS/Sass Modal Dialog
View gist:2044437
<!-- HTML -->
<div class="modal-dialog-background">
<div class="modal-dialog">
<div class="inner-wrapper">
<p>Press submit to record your answers.</p>
<div class="buttons">
<button type="button" class="cancel">Cancel</button>
<button type="button" class="submit">Submit</button>
plapier / dabblet.css
Created Oct 10, 2012 — forked from daneden/dabblet.css
CSS Photo Album
View dabblet.css
/* CSS Photo Album */
/* Rebound of this shot by @daryl: */
* {
margin: 0;
padding: 0;
position: relative;
box-sizing: border-box;