Skip to content

Instantly share code, notes, and snippets.

@Shpigford
Shpigford / gist:6158106
Last active December 20, 2015 15:59
Temper email subject line to PopSurvey.com customers...
Which of these do you think would work best? Emailing this out to all our PopSurvey customers to let them know about Temper. They've never heard of Temper but the product (and "customer happiness") are something most are interested in.
* Track customer happiness with Temper, a new tool by PopSurvey
* Announcing Temper: A new tool to track customer happiness by PopSurvey
* PopSurvey launches new tool to track customer happiness!
* New from PopSurvey - Track Customer Happiness with Temper
* Increase customer satisfaction with Temper, a new tool by PopSurvey
...or something else?
@Shpigford
Shpigford / retina_icons.scss
Created July 5, 2013 14:50
Single-resource retina sprites
$icons: sprite-map("icons/*.png", $spacing: 3px);
@mixin responsive-sprite($icon) {
$iconname: "icons/#{$icon}.png";
$iconwidth: round(image-width($iconname)/2);
$iconheight: round(image-height($iconname)/2);
$pos: sprite-position($icons, $icon);
$posx: round(nth($pos, 1)/2);
$posy: round(nth($pos, 2)/2);
// SASS
nav {
a {
color: green;
li.selected & {
color: red;
}
}
}
@Shpigford
Shpigford / variables_example.html
Created May 22, 2013 15:52
Temper Variables Example
<!-- data-variables="[email protected]&user_id=13&last_seen=January 14, 2013" -->
<script
data-id="femybxrj"
data-format="inline"
data-size="medium"
data-variables="[email protected]&user_id=13&last_seen=January 14, 2013"
src="//localhost:3000/d.js"
class="temper"
async>
@Shpigford
Shpigford / cdn_urls
Created March 30, 2013 02:09
My ISP (Charter) is having trouble loading certain CDNs. I'm stumped. They're stumped.
use.typekit.net
passets-ec.pinterest.com
g.virbcdn.com
0.gravatar.com
static3.businessinsider.com
fbstatic-a.akamaihd.net
@Shpigford
Shpigford / awesome.scss
Last active December 12, 2015 00:28
Why SASS + Compass is teh awesome...
// The yummy goodness that made this go REAALLLLY fast
@import "smilies/*.png";
@include all-smilies-sprites;
.smiley {
@include inline-block;
&.large {
height: smilies-sprite-height(red-large);
width: smilies-sprite-height(red-large);
&.red { @include smilies-sprite(red-large); }
@Shpigford
Shpigford / api.rb
Created October 25, 2012 17:19 — forked from gertig/api.rb
Snippets for an API with grape
# Server App
# This file must be in lib/myapp/api.rb
module MyApp
module Entities
class Products < Grape::Entity
expose :id, :code, :name, :short_description
expose :description, :unless => { :collection => true }
expose (:category) { |model, options| model.category.name }
expose (:brand) { |model, options| model.brand.name }
end
@Shpigford
Shpigford / style.css
Created October 24, 2012 13:39
CSS Comment Style
/*-----------------------------------------------------------------------------
HEADER
Some description about the awesomeness of the thing
-----------------------------------------------------------------------------*/
@Shpigford
Shpigford / dabblet.css
Created July 30, 2012 19:31
Break-out elements
/**
* Break-out elements
*/
.wrapper {
width:300px;
margin:0 auto;
background:yellow;
}
.break {
@Shpigford
Shpigford / dabblet.css
Created July 30, 2012 14:11
Break-out elements
/**
* Break-out elements
*/
.wrapper {
width:300px;
margin:0 auto;
background:yellow;
}
.break {