Skip to content

Instantly share code, notes, and snippets.

View jefffis's full-sized avatar
🌵
Birgleflickle

Jeff Doan jefffis

🌵
Birgleflickle
View GitHub Profile
@jefffis
jefffis / gist:aff7050803e3c63a3f9c
Created February 20, 2015 23:39
Find those pesky snippets in Sublime Text 3
alias sbs="cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/"
@jefffis
jefffis / gist:37e53a2e8b7759bc4118
Last active August 29, 2015 14:14
IE8 and below
<!--[if lte IE 8]>
<div class="old-browsers<?php if(isset($_COOKIE['hide-old-browser-content'])): ?> hide<?php endif; ?>">
<p>It seems you are using an older version of Internet Explorer. While this site may work decently well, a lot of functionality might not work as expected or as well if you were using a modern browser. We suggest using <a href="https://www.google.com/intl/en/chrome/browser/" target="_blank">Google Chrome</a>, <a href="http://www.mozilla.org/en-US/firefox/new/" target="_blank">Mozilla Firefox</a>, or the latest version of <a href="http://windows.microsoft.com/en-us/internet-explorer/download-ie" target="_blank">Internet Explorer</a> (at least version 9) available on your computer. To read more about what browsers we support, <a href="http://blog.leagueapps.com/how-we-think-about-browser-support/" target="_blank">read this blog post</a>.</p>
<p id="hide-old-browser-content"><a href="#">Hide this notice</a></p>
</div>
<script type="text/javascript">
function SetCookie(cookieName,cook
@jefffis
jefffis / gist:5eb2bcbaa50def3e6a85
Created October 24, 2014 16:17
Eat24 Weekend Coupon Code email re-do
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge;chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Eat24 Weekend Coupon</title>
@jefffis
jefffis / gist:806f4082eb00004cf191
Created October 22, 2014 17:44
Responsive email template -- works in Outlook, Gmail, pretty much everywhere but Lotus Notes. Also, works great on mobile in Gmail =)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge;chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Single-Column Responsive Email Template</title>
@jefffis
jefffis / gist:32f1f4cbea2231ff9d2e
Last active August 29, 2015 14:07
Mobile Chrome downloads the apple-touch-icon-precomposed image onLoad
<!--
chrome will start downloading this when the page renders
this can cause serious scroll lag if the image is not properly optimized
-->
<link rel="apple-touch-icon-precomposed" href="{url_here}" />
@jefffis
jefffis / gist:44e2a0daf1704492f623
Created May 21, 2014 18:01
Mailchimp Editor Issues
// email code in MC
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://leagueappspartnerdays.com/events/34496-leagueapps-partner-day-in-boston" arcsize="75%" strokecolor="#d54a1f" fillcolor="#fb8a06" style="height:40px;v-text-anchor:middle;width:300px;" >
<w:anchorlock/>
<center style="color:#ffffff;font-family:sans-serif;font-size:13px;font-weight:bold;" >Register for our next<br>Partner Day in Boston</center>
</v:roundrect>
<![endif]-->
<a href="http://leagueappspartnerdays.com/events/34496-leagueapps-partner-day-in-boston" class="btn ctr two-line" style="background-color:#fb8a06;background-image:none;background-repeat:repeat;background-position:4c06);background-attachment:scroll;display:block;color:white;text-decoration:none;font-size:20px;text-shadow:0 1px 0 rgba(0,0,0,0.15), 0 2px 1px rgba(0,0,0,0.1);border-width:2px;border-style:solid;border-color:#d54a1f;mso-hide:all;letter-spacing:-.25px;border-radius:100px;line-height:22px;
@jefffis
jefffis / gist:9840996
Last active August 29, 2015 13:57
Simulate slower connections on OS X

##In the terminal:

$ sudo ipfw pipe 1 config bw 15KByte/s
$ sudo ipfw add 1 pipe 1 src-port 80

This will restrict all incoming bandwidth to 15 Kb. Change it to whatever value you like.

E.g.

@jefffis
jefffis / gist:9275966
Created February 28, 2014 17:50
Replace spaces in filenames with dashes
for i in *.[file_ext]; do mv "$i" "`echo $i | sed -e 's, ,-,g'`"; done
## where file_ext is something like png, gif, or jsp
## src: http://www.chrislongcreativeservices.com/replacing-spaces-in-file-names-on-osx/
@jefffis
jefffis / gist:8712165
Last active August 29, 2015 13:55
Update your apps; automatically display current year in different languages
// PHP
date("Y")
// Ruby
Time.now.year
// Python
print date.today().year + 1
// Java