This file contains 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
<h1 class="inset-text">Inset text-shadow trick</h1> |
This file contains 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
<a href="tel:1-408-555-5555">1-408-555-5555</a> | |
<a href="sms:1-408-555-1212">New SMS Message</a> |
This file contains 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
/* warp speed ahead */ | |
.animClass { | |
-webkit-transform: translate3d(0, 0, 0); | |
/* more specific animation properties here */ | |
} | |
/* | |
The use of translate3d pushes CSS animations into hardware acceleration. | |
Even if you're looking to do a basic 2d translation, use translate3d for more power! | |
If your animation is still flickering after switching to the transform above, |
This file contains 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
// ABOUT | |
A simple LESS (http://lesscss.org) snippet based on http://snook.ca/archives/html_and_css/font-size-with-rem | |
It doesn't do much but saves you typing things twice, allowing you to use rem as a unit for font-sizes | |
and giving a px fallback for IE | |
// MIXIN | |
.font-size(@font-size: 16){ | |
@rem: (@font-size / 10); | |
font-size: @font-size * 1px; | |
font-size: ~"@{rem}rem"; |
This file contains 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
# Basic Settings | |
# | |
fontName = "Monaco" | |
fontSize = 12 | |
# Extra files to include | |
# | |
myExtraIncludes = ".tm_properties,.htaccess,.gitignore" | |
fileBrowserGlob = "{*,$myExtraIncludes}" | |
include = "{$include,$myExtraIncludes}" |
This file contains 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
// My Birthday :) | |
$date_1 = new DateTime( '1989-06-15' ); | |
// Todays date | |
$date_2 = new DateTime( date( 'Y-m-d' ) ); | |
$difference = $date_2->diff( $date_1 ); | |
// Echo the as string to display in browser for testing | |
echo (string)$difference->y; |
This file contains 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 is_email(id){return (/^([\w!.%+\-\*])+@([\w\-])+(?:\.[\w\-]+)+$/).test(id);} |
This file contains 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
<div id="scrollbubble"></div> | |
<div style="height: 2000px"> | |
<p>Scroll<br />down<br />↓ ↓ ↓</p> | |
</div> |
This file contains 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
$.fn.nextOrFirst = function(selector){ | |
var next = this.next(selector); | |
return (next.length) ? next : this.prevAll(selector).last(); | |
}; | |
$.fn.prevOrLast = function(selector){ | |
var prev = this.prev(selector); | |
return (prev.length) ? prev : this.nextAll(selector).last(); | |
}; |
This file contains 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
var Loader = function () { } | |
Loader.prototype = { | |
require: function (scripts, callback) { | |
this.loadCount = 0; | |
this.totalRequired = scripts.length; | |
this.callback = callback; | |
for (var i = 0; i < scripts.length; i++) { | |
this.writeScript(scripts[i]); | |
} |
NewerOlder