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
# ---------------------------------------------- | |
# Quick method: | |
# ---------------------------------------------- | |
Options +MultiViews | |
# With Apache MultiViews, the server will look for files that match the requested resource (eg. a request for "site.com/page" will serve "site.com/page.php") | |
# ---------------------------------------------- | |
# Long method: |
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
detectFlash: -> | |
if navigator.plugins["Shockwave Flash"] | |
return true | |
return false | |
# usage: | |
# if detectFlash() | |
# console.log "Flash supported" | |
# else |
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
.overflowing-text { | |
display: block; | |
overflow: hidden; | |
white-space: nowrap; | |
text-overflow: ellipsis; | |
} |
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
$obj = (object) array('prop' => value, 'prop' => $var); |
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
setTimeout => | |
@_delayedFunc() | |
,1000 |
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
distanceKM = 100 | |
distanceMiles = distanceKM / 0.6 # => 166.66667 | |
distanceMilesRounded = parseFloat(distanceMiles, 10).toFixed 1 # => 166.7 |
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
// 1. Add definition to foot of module.js (the required file) | |
// AMD Define | |
define(function(){ | |
return baron; | |
}); | |
// 2. Add the path to main.js (requireJS config) as normal | |
require.config({ | |
baseUrl: "/sites/all/themes/base/js/", |
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
.page-wrapper { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
z-index: 700; /* must be the higher than all other elements */ | |
overflow: auto; /* moves scrollbars inside border */ | |
background: #fff; | |
border: 5px solid #ff9900; |
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
/* Here's the compiled CSS */ | |
@import url("http://fonts.googleapis.com/css?family=Droid+Sans"); | |
body { | |
font-family: Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif; | |
font-size: 14px; | |
line-height: 25px; | |
font-weight: 300; | |
color: #444; | |
} |