Skip to content

Instantly share code, notes, and snippets.

@samdoidge
samdoidge / gist:0594a8429d2ded5094f2
Created May 7, 2014 03:22
.htaccess remove www
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.samdoidge.com$ [NC]
RewriteRule ^(.*)$ http://samdoidge.com/$1 [R=301,L]
</IfModule>
@samdoidge
samdoidge / content
Created April 28, 2014 13:21
Copy without SVN files
rsync -avzr --exclude=.svn /dir/ /dir-copy/
@samdoidge
samdoidge / grep-exclude-file-extension
Created October 11, 2013 10:50
grep exclude file extension, recursively search through current directory
grep -r --exclude '*.sql' 'search string' .
@samdoidge
samdoidge / grep-file-extension
Last active December 25, 2015 06:29
grep recursively through the current folder with a specific file extension
grep -r --include="*.php" "search string" .