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() { | |
$('#back-top a').click(function () { | |
$('body,html').animate({ | |
scrollTop: 0 | |
}, 800); | |
return false; | |
}); | |
}); |
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
$("*[style]").attr("style", ""); |
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 fg-color($bg-color) { | |
@if lightness($bg-color) < 30% { | |
color: #eee; | |
} else { | |
color: #333; | |
} | |
} | |
@mixin readable($bg-color) { | |
background-color: $bg-color; |
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
<!-- Favicons and touch icons --> | |
<!-- For retina-display iPads --> | |
<link href="/assets/ico/[email protected]" rel="apple-touch-icon-precomposed" sizes="144x144" type="image/png"/> | |
<!-- For retina-display iPhones --> | |
<link href="/assets/ico/[email protected]" rel="apple-touch-icon-precomposed" sizes="114x114" type="image/png"/> | |
<!-- For iPad 1 --> | |
<link href="/assets/ico/Icon-iPad.png" rel="apple-touch-icon-precomposed" sizes="72x72" type="image/png"/> | |
<!-- For iPhone 3G, iPod Touch and Android --> | |
<link href="/assets/ico/Icon.png" rel="apple-touch-icon-precomposed" type="image/png"/> | |
<!-- For Nokia --> |
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
/* Inset */ | |
.inset { | |
text-shadow: 0px -2px 0px #333, | |
0px 2px 3px #666; | |
} | |
/* 3D */ | |
.three-d { | |
text-shadow: 0 1px 0 #bbb, | |
0 2px 0 #bbb, |
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 stuff that has not been committed | |
svn status | |
# Find files that have not been added | |
svn status | grep -e ^? | |
# Find files that have been modified | |
svn status | grep -e ^M | |
# Find and add files that have not been added |
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
/* equal height columns */ | |
var colHeight = Math.max( | |
$('#main').height(), | |
$('#left').height(), | |
$('#right').height() | |
); | |
$('#main, #left, #right').height(colHeight); |
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
//This code will be super useful for people managing images or photography website. With it, you can analyze any image and get its dominant color (R, G, or B). | |
$i = imagecreatefromjpeg("image.jpg"); | |
for ($x=0;$x<imagesx($i);$x++) { | |
for ($y=0;$y<imagesy($i);$y++) { | |
$rgb = imagecolorat($i,$x,$y); | |
$r = ($rgb >> 16) & 0xFF; | |
$g = ($rgb >> & 0xFF; | |
$b = $rgb & 0xFF; |
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
# clone branch | |
git clone -b <branch> <remote_repo> |
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
/* | |
* Filename | |
* Description of the file and its contents. Sometimes followed by a | |
* table of contents. | |
* | |
* Maximum Line Length = 70 chars | |
* | |
* --------------------------------------------------------------- */ | |
/* Section Heading |