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
Backbone.Marionette.TemplateCache.preloadTemplate = function (templateId, context) { | |
// preload a single template | |
var loader = $.Deferred(); | |
var that = this; | |
var msg; | |
var err; | |
if (!templateId || templateId.length == 0) { | |
err = new Error('No templateId was specified - please provide a valid template id or filename.'); | |
err.name = "NoTemplateSpecified"; | |
throw err; |
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
'use strict'; | |
/** | |
* services.cordova Module | |
* | |
* General Cordova services module | |
*/ | |
angular.module('bili.services.cordova') |
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
/** | |
* Use em or rem font-size in Bootstrap 3 | |
*/ | |
@font-size-root: 14px; | |
@font-unit: 0rem; // Pick em or rem here | |
// Convert all variables to em |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
angular.module('app.services') | |
.factory('Nsfw', function ($rootScope) { | |
'use strict'; | |
var _nsfw = false; | |
var broadcastNsfw = function (nsfw) { | |
$rootScope.$broadcast('Nsfw.Update', nsfw); | |
}; | |
var toggleNsfw = function () { |
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
"use strict"; | |
var crypto = require("crypto"); | |
var EncryptionHelper = (function () { | |
function getKeyAndIV(key, callback) { | |
crypto.pseudoRandomBytes(16, function (err, ivBuffer) { | |
var keyBuffer = (key instanceof Buffer) ? key : new Buffer(key) ; |