http://blog.lunatech.com/2013/07/04/play-securesocial-slick
http://www.infoq.com/presentations/Akka-Actors
http://alexsexton.com/blog/2013/03/deploying-javascript-applications/
| <pre> | |
| <?php | |
| function microtime_float() { | |
| list($usec, $sec) = explode(" ", microtime()); | |
| return ((float)$usec + (float)$sec); | |
| } | |
| $algos = hash_algos(); | |
| $string = "The quick brown fox jumped over the lazy dog."; |
| <?php | |
| /** | |
| * Doctrine logger for FireBug | |
| * | |
| * @license http://www.opensource.org/licenses/lgpl-license.php LGPL | |
| * @author Magnus Andersson <mange@mange.name> | |
| */ | |
| namespace My\Namespace; | |
| use Doctrine\DBAL\Logging\SqlLogger; |
| var obj = (function(){ | |
| function Class() { | |
| } | |
| Class.prototype = { | |
| _var : null, | |
| func1 : function() { | |
| }, | |
| func2 : function() { | |
| } | |
| }; |
| (function(fn, i) { | |
| (function () { | |
| fn(i++) ? arguments.callee() : null; | |
| }()); | |
| }(function(fn, max) { | |
| return function(i) { | |
| fn(i); | |
| return i<max; | |
| }; | |
| }(console.log, 50), 30)); |
| <script> | |
| head.ready(function() { | |
| // Use your javascript here... | |
| // Load a new js file: | |
| head.js("path/to/file.js", function() { | |
| // here the new script is available | |
| }); |
| implicit val carWriter = Json.writes[Car] | |
| implicit val userWithCarWriter = Json.writes[UserWithCar] | |
| def users = Action { | |
| val users = DB.withSession { implicit session => | |
| val q = for { | |
| u <- Users | |
| c <- Cars if u.carId === c.id | |
| } yield (u, c) | |
| q.list.map { row => |
| (function (factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['jquery'], factory); | |
| } else { | |
| factory(jQuery); | |
| } | |
| }(function ($) { | |
| $.fn.jqueryPlugin = function () {}; | |
| })); |
| # Pure | |
| # by Sindre Sorhus | |
| # https://github.com/sindresorhus/pure | |
| # MIT License | |
| # Change this to your own username | |
| DEFAULT_USERNAME='mange' | |
| # Threshold (sec) for showing cmd exec time |
| module.exports = function(grunt) { | |
| 'use strict'; | |
| grunt.registerMultiTask('cram', 'Cram runner for grunt', function() { | |
| // Cram failed, tell grunt | |
| function fail (ex) { | |
| grunt.fail.warn('cram failed: ', ex && ex.message || ex); | |
| if (ex && ex.stack) console.log(ex.stack); | |
| } |