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
$ ll | |
$ sudo chown -R hub_bot:www-data . | |
$ sudo chmod -R 755 . |
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
distanceKM = 100 | |
distanceMiles = distanceKM / 0.6 # => 166.66667 | |
distanceMilesRounded = parseFloat(distanceMiles, 10).toFixed 1 # => 166.7 |
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
// 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 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 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 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 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 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 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 app = new App('arg'); | |
App = function(arg) { | |
this.APP_CONSTANT = 0; | |
this.appVar = arg; | |
this._init(); | |
} |
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
$ python -m SimpleHTTPServer 8000 |
OlderNewer