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:5221491
Last active December 15, 2015 07:09
A thought on not using <select> elements for dropdown lists outside of forms. It's more meaningful to the browser, works without JS, and MUCH easier to style for us designy types.
<html>
<head>
<style>
/*
// CSS
these styles can be anything, but this was from a recent project.
basically, i'm setting the height of the <ul> and each <li> and only on :hover showing all of them. when clicking a list item, that is then showed as .selected when a user :hoversout of the <ul>
@jefffis
jefffis / gist:5599133
Created May 17, 2013 13:49
restart apache command
sudo service httpd restart
@jefffis
jefffis / gist:6297098
Created August 21, 2013 17:00
HTML with media queries for mobile devices
<!DOCTYPE html>
<html>
<head>
<title>180 Days: A language learning challenge | Rosetta Stone</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<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" />
<style type="text/css">
* { -webkit-text-size-adjust:none; }
@jefffis
jefffis / gist:6720007
Last active December 24, 2015 00:58
Using @font-face in email and how to apply fallbacks for Outlook.
Use @font-face like normal:
@font-face {
// code here
}
There is an Outlook 2007 & up hack I've used at times that seems to fix this as well:
<!--[if gte mso 9]>
<style>
@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
@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: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: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: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}" />