Skip to content

Instantly share code, notes, and snippets.

View trevor-atlas's full-sized avatar
👾
Variety is the spice of life, or something

Trevor Atlas trevor-atlas

👾
Variety is the spice of life, or something
View GitHub Profile
##
# Here are a couple of recipes to download and archive an entire Web site, starting with the given page and recursing down.
#
# Pitfalls
# As of 2008, WGet doesn't follow @import links in CSS.
#
# Credit to http://lifehacker.com/software/top/geek-to-live--mastering-wget-161202.php
# And http://www.veen.com/jeff/archives/000573.html
@trevor-atlas
trevor-atlas / .aliase
Created January 4, 2015 19:00
zsh/bash aliases
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
# Shortcuts
alias ggl="cd ~/Google\ Drive"
@trevor-atlas
trevor-atlas / delete-unnecessary.sh
Created December 3, 2014 16:49
Find and delete extraneous osx files
find /var/www/html \( -name '.DS_Store' -or -name '._*' \) -delete
@trevor-atlas
trevor-atlas / gist:e6815738d856f512ee56
Created December 3, 2014 14:54
pseudo element triangle border
.element:before {
content: '';
width: 0;
height: 0;
border-style: solid;
border-width: 0 50px 50px 0;
border-color: transparent grey transparent transparent;
position: absolute;
top: 0;
right: 0;
@trevor-atlas
trevor-atlas / placeholder.css
Created December 3, 2014 14:50
placeholder css styles
input::placeholder {
color: #222222;
}
@trevor-atlas
trevor-atlas / gist:8409a35f590099c2c3f1
Created November 25, 2014 20:38
pull in changes and reset to master
# This should only be run on your production environment to pull in commited changes.
# DO NOT USE THIS ON YOUR DEVELOPMENT BUILD OR YOU WILL LOSE ANY CHANGES SINCE YOUR LAST PUSHED COMMIT!
git fetch --all && git reset --hard origin/master
@trevor-atlas
trevor-atlas / .htaccess
Created November 17, 2014 17:14
Force Https
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^domainname\.com*
RewriteRule ^(.*)$ https://www.domainname.com/$1 [L,R=301]
@trevor-atlas
trevor-atlas / style testpage
Created November 12, 2014 02:11
simple html page with many common elements. Useful for testing styles and concistency. Ripped from github.com/google/web-starter-kit
<!doctype html>
<html lang="en" class="no-js no-touch" itemscope itemtype="http://schema.org/Article">
<head>
<meta charset="utf-8" >
<meta name="description" content="Visual style guide used by this site.">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">
<meta itemprop="name" content="Visual Style Guide — Web Starter Kit">
<meta itemprop="description" content="Visual style guide used by this site.">
gulp.task('jekyll', function(){
return require('child_process').spawn('jekyll', ['serve', '--watch'], { stdio: 'inherit' });
});
gulp.task('default', ['jekyll']);
@trevor-atlas
trevor-atlas / gist:c903b48c8ee8480c4a20
Created October 28, 2014 00:25
restore middle click functionality on e.preventDefault() links
// allow command-click and control-click to open new tab
if (event.metaKey || event.ctrlKey) {
return;
} else {
event.preventDefault();
}