This file contains hidden or 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
(function ($) { | |
"use strict"; | |
var wnd = $(window), | |
lastScrollTop = wnd.scrollTop(), | |
lastScrollLeft = wnd.scrollLeft(); | |
wnd.on("scroll", function (event) { | |
var scrollTop = wnd.scrollTop(), | |
scrollLeft = wnd.scrollLeft(), |
This file contains hidden or 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
// Add this to stylesheet to find all unsized images | |
// Via 37signals http://37signals.com/svn/posts/2979-css-tip-spot-unsized-images-during-development | |
img:not([width]):not([height]) { | |
border: 2px solid red !important; | |
} |
This file contains hidden or 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
<?php | |
//Probably an iPad | |
if(stristr($_SERVER['HTTP_USER_AGENT'], 'iPad')) { | |
echo '<meta name="viewport" content="width=980;user-scalable=yes;" />'; | |
} | |
else{ | |
echo '<meta name="viewport" content="width=1150;user-scalable=yes;" />'; | |
} |
This file contains hidden or 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
find . -name *.DS_Store -type f -exec rm {} \; |
This file contains hidden or 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
for file in *.html ; do mv $file `echo $file | sed 's/\(.*\.\)html/\1php/'` ; done |
This file contains hidden or 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
#!/bin/bash | |
ls | while read -r FILE | |
do | |
mv -v "$FILE" `echo $FILE | tr ' ' '_' ` | |
done |
This file contains hidden or 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
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}\.php -f | |
RewriteRule ^(.*)$ $1.php |
This file contains hidden or 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(RIGHT(A1,(LEN(A1)-(LEN(A1)-1)))="/",LEFT(A1,(LEN(A1)-1)),A1) |
This file contains hidden or 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
@media only screen and (device-aspect-ratio: 40/71) |
This file contains hidden or 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
Replace all instances of old_string with new_string recursively within the current directory and its sub-directories: | |
grep -rl old_string * | xargs sed -i '' 's/old_string/new_string/g' |