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
<script type="text/javascript"> | |
WebFontConfig = { | |
google: { families: [ 'Source+Code+Pro::latin' ] } | |
}; | |
(function() { | |
var wf = document.createElement('script'); | |
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + | |
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; | |
wf.type = 'text/javascript'; | |
wf.async = 'true'; |
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
/* TOP - 100 IS THE VERTICAL OFFSET IN PIXELS */ | |
$('#link').click(function() { | |
$('html, body').animate({ | |
scrollTop: $('#anchor').offset().top - 100 | |
}, 600); | |
}); |
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
<script type="text/javascript"> | |
var select = $('.card-expiry-year'), | |
year = new Date().getFullYear(); | |
for (var i = 0; i < 12; i++) { | |
select.append($("<option value='"+(i + year)+"' "+(i === 0 ? "selected" : "")+">"+(i + year)+"</option>")) | |
} | |
</script> | |
<select class="card-expiry-year"></select> |
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
@mixin vertical-align { | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} | |
.item p { | |
@include vertical-align; |
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
$('#searchform').submit(function(e) { | |
var s = $( this ).find("#s"); | |
if (!s.val()) { | |
e.preventDefault(); | |
alert("Your search is empty!"); | |
$('#s').focus(); | |
} | |
}); |
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
// Browser Prefixes | |
@mixin transform($transforms) { | |
-webkit-transform: $transforms; | |
-moz-transform: $transforms; | |
-ms-transform: $transforms; | |
transform: $transforms; | |
} | |
// Rotate | |
@mixin rotate ($deg) { |
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
//HEADER | |
<meta name="msapplication-config" content="browserconfig.xml" /> | |
//ROOT - browserconfig.xml | |
<?xml version="1.0" encoding="utf-8"?> | |
<browserconfig> | |
<msapplication> | |
<tile> | |
<square70x70logo src="images/smalltile.png"/> | |
<square150x150logo src="images/mediumtile.png"/> |
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
// UPDATE POST CONTENT | |
UPDATE wp_posts SET `post_content` | |
= REPLACE (`post_content`, | |
'OriginalText', | |
'ReplacedText'); | |
// CHANGE POSTS TO PAGES | |
UPDATE wp_posts SET post_type = 'page' WHERE post_type = 'post' | |
// CHANGE PAGES TO POSTS |
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
//MIXIN | |
@mixin text-inset($colour, $opacity: 0.5) { | |
@if lightness($colour) < 50% { | |
//DARK TEXT - LIGHT SHADOW | |
text-shadow: 1px 1px 1px rgba(#fff, $opacity); | |
} @else { | |
//LIGHT TEXT - DARK SHADOW | |
text-shadow: -1px -1px 1px rgba(#000, $opacity); |