This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
http://blog.cloudfour.com/seven-things-i-learned-while-making-an-ipad-web-app-2/ | |
--> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="default|black|black-translucent"> | |
<meta name="format-detection" content="telephone=no"> | |
<!-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://www.brettjankord.com/2012/11/28/cross-browser-retinahigh-resolution-media-queries/ */ | |
/* 1.25 dpr */ | |
@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { | |
} | |
/* 1.3 dpr */ | |
@media (-webkit-min-device-pixel-ratio: 1.3), (min-resolution: 124.8dpi) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!Modernizr.inlinesvg) { | |
;(function () { | |
var imgs = document.getElementsByTagName('img') | |
, totalImgs = imgs.length | |
, i = 0 | |
for (i = 0; i < totalImgs; i++) { | |
imgs[i].src = imgs[i].src.replace(/svg$/, 'png') | |
} | |
}()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.icon { | |
background: transparent url("../img/icon.svg") no-repeat left top; | |
} | |
/* Depends on Modernizr */ | |
.no-inlinesvg .icon { | |
background-image: url("../img/icon.png"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
http://www.456bereastreet.com/archive/201211/using_javascript_to_check_if_images_are_enabled/ | |
Will add the class `images-on` to <body> | |
Check if images are disabled: http://www.paciellogroup.com/blog/2011/10/detecting-if-images-are-disabled-in-browsers/ | |
*/ | |
(function() { | |
var image = new Image(); | |
image.onload = function() { | |
if (image.width > 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
rsync -e ssh -a -r --delete --delete-excluded --progress --compress --chmod=u=rwx,go=rx --exclude-from 'rsync-exclude.txt' ./ ssh-server-alias:/path/on/remote/server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://people.opera.com/danield/utils/webtv.html */ | |
@media tv, (width: 1920px) and (height: 1080px), (width: 1280px) and (height: 720px) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
cwd = os.getcwd().replace("/Users/thomasjbradley/Dropbox/www/", "") | |
domain = "http://" | |
dir_bits = cwd.split("/") | |
domain += dir_bits.pop(0) | |
domain += ".dev/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost *:80 | |
NameVirtualHost *:443 | |
<Virtualhost *:80> | |
VirtualDocumentRoot /www/%1 | |
UseCanonicalName Off | |
SetEnv ENV dev | |
ServerName vhosts.dev | |
ServerAlias *.dev | |
ServerAlias *.xip.io |
OlderNewer