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
module.exports = function(config) { | |
config.set({ | |
// base path, that will be used to resolve files and exclude | |
basePath: '.', | |
// list of files / patterns to load in the browser | |
files: [ | |
'lib/angular-1.1.4.js', | |
'test/lib/angular-mocks-1.1.4.js', | |
'test/testUtils.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
navigator.geolocation.getCurrentPosition = function(callback) { | |
console.log("Hey look, I'm in London!"); | |
callback({ | |
"timestamp": (new Date()).getTime(), | |
"coords": { | |
"speed": null, | |
"heading": null, | |
"altitudeAccuracy": null, | |
"accuracy": 89, |
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
<?php | |
/** models/Users.php **/ | |
use lithium\security\Auth; | |
class Users extends \lithium\data\Model { | |
// ... |
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
<?php | |
/** config/bootstrap/libraries.php **/ | |
// ... | |
Libraries::add('stripe', array( | |
'path' => LITHIUM_APP_PATH . '/libraries/stripe/lib', | |
'prefix' => null | |
)); |
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
<?php | |
/** | |
* Snippet extracted from `config/bootstrap/action.php`. | |
*/ | |
/** | |
* ## Mapping HTTP Request Parameters to Query Parameters | |
* | |
* The `$replacer` function is used by the `Resources` filter below to allow resource classes to | |
* automatically map values from the `Request` object in their query configurations. |
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
/** | |
* Naive AngularJS module autoloader; depends on require.js. | |
* | |
* Usage: | |
* | |
* angular.autoLoad({ | |
* 'ngResource': '/js/angular-resource-1.0.1.min.js', | |
* 'google-maps': '/js/angular-google-maps.js', | |
* 'ui.bootstrap': '/js/ui/ui-bootstrap-custom-tpls-0.4.0.min.js', | |
* 'module.split.over.multiple.files': ['/js/file1.js', '/js/file2.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
<?php | |
namespace my_app\models; | |
use MongoId; | |
use lithium\data\collection\DocumentArray; | |
use lithium\data\collection\DocumentSet; | |
use lithium\data\entity\Document; | |
use lithium\util\Inflector; | |
use lithium\core\Libraries; |
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
<?php | |
namespace moneygram\extensions\imagine; | |
use Imagine\Image\Box; | |
use Imagine\Image\Point; | |
use Imagine\Image\Color; | |
class SepiaToneFilter implements \Imagine\Filter\FilterInterface { |
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
<?php | |
use lithium\net\http\Media; | |
/** | |
* This re-maps your template paths so you can have stuff like `pages/users_{username}.php` | |
* instead of the Lithium default. | |
*/ | |
Media::type('html', 'text/html', array( | |
'view' => 'lithium\template\View', |
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
<?php | |
/** | |
* Continuation routing examples. Handles URLs in the following forms: | |
* | |
* /posts | |
* /en/posts | |
* /admin/posts | |
* /admin/en/posts | |
* /admin/en/posts.json | |
* /admin/en/posts/4ef16ccc7f8b9aa331000064.json |
NewerOlder