Skip to content

Instantly share code, notes, and snippets.

View plapier's full-sized avatar

Phil LaPier plapier

View GitHub Profile
@plapier
plapier / ellipsis.scss
Created February 14, 2013 18:18
Sass Ellipsis Mixin
@mixin ellipsis ($max-width){
display: inline-block;
max-width: $max-width;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@plapier
plapier / js2coffeescript.rb
Last active December 14, 2015 02:59
Convert Javascript to CoffeeScript (vice versa) directly from vim. Uses js2coffee library.
#!/usr/bin/env ruby
require 'tempfile'
file = Tempfile.new(['js2coffee', '.js'])
file.write ARGF.read # write vim selection to tmp file
file.rewind
file.close
puts `js2coffee #{file.path}` # requires js2coffee
file.unlink # deletes the temp file
$ = jQuery
class Modal
@ESC_KEY_CODE: 27
constructor: (@modal) ->
@_addDialogBackground()
@_listenForDialogDismiss()
show: ->
@plapier
plapier / SassMeister-input-HTML.html
Created March 27, 2014 20:18
Generated by SassMeister.com.
<div>foobar</div>
@plapier
plapier / SassMeister-input.scss
Created April 11, 2014 18:44
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// Bourbon (v)
// ----
@import "bourbon/bourbon";
body{
@include transition (all 2.0s ease-in-out);
@plapier
plapier / LaunchStarter.swift
Created May 23, 2015 23:45
Add Login item using Launch Services (Shared List File) in Swift
//
// toggleLaunchAtStartup.swift
// Recents
//
// Created by Phil LaPier on 5/21/15.
// Copyright (c) 2015 Philip LaPier. All rights reserved.
//
// With help from: https://github.com/RamonGilabert/Prodam/blob/master/Prodam/Prodam/LaunchStarter.swift
import Foundation