A Pen by David Cochran on CodePen.
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
| /* See Chris Coyier CSS Tricks | |
| http://css-tricks.com/perfect-full-page-background-image/ | |
| */ | |
| html { | |
| background: url(images/bg.jpg) no-repeat center center fixed; | |
| -webkit-background-size: cover; | |
| -moz-background-size: cover; | |
| -o-background-size: cover; | |
| background-size: cover; |
We'll create Terminal aliases to efficiently open files in our browser of choice.
From Terminal ...
Edit the bash profile, by typing:
vim .bash_profile
Then type i to insert.
We'll create a Terminal alias to efficiently open a chosen file in Sublime Text 2.
From Terminal ...
Edit the bash profile, by typing:
vim .bash_profile
Then type i to insert.
Some of the Aliases I use in my .bash_profile for OS X Terminal:
# Open a file in Sublime Text 2
alias subl='open -a Sublime\ Text\ 2'
#Edit Bash Profile in Sublime Text 2
alias bashprof='subl .bash_profile'
# Open a file in desired browser
alias ff='open -a Firefox'
A very basic starter template with fundamental HTML5 markup -- only the basics.
Based on HTML5 Bones | http://html5bones.com
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
| From: | |
| http://wordpress.org/support/topic/multiple-loops-if-first-post-in-loop-1-matches-first-post-in-loop-2-skip | |
| Add this after the query: | |
| $check = get_posts('cat=3&numberposts=1'); | |
| if ( $check[0]->ID == $post->ID ) continue; | |
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
| // Animate scroll to all page anchors | |
| $('[href^=#]').click(function (e) { | |
| e.preventDefault(); | |
| var div = $(this).attr('href'); | |
| $("html, body").animate({ | |
| scrollTop: $(div).position().top | |
| }, "slow", "swing"); | |
| }); |
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
| /* | |
| In a situation such as this markup | |
| where we want columns to organize themselves | |
| into two rows at on smaller screens. | |
| This Bootstrap 3 markup gets us most of the way there. | |
| <div class="col-sm-4 col-md-2"> | |
| ... | |
| <div class="col-sm-4 col-md-2"> | |
| ... | |
| <div class="col-sm-4 col-md-2"> |
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
| .products-grid { | |
| display: table; | |
| } | |
| .product-item { | |
| float: none; // override default grid floating behavior | |
| display: inline-table; | |
| margin-right: -1em; // http://www.tylercipriani.com/2012/08/01/display-inline-block-extra-margin.html | |
| vertical-align: top; // Safari defaults to vertical-align center | |
| } |