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 util = require('util'); | |
var events = require('events'); | |
function Promise(done) { | |
Promise.super_.call(this); | |
this.results = null; | |
this.errors = null; | |
this.ended = false; |
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 fs = require('fs'), | |
path = require('path'), | |
_ = require('underscore'), | |
when = require('when'), | |
express = require('express'), | |
GhostPlugin = require('../../../core/server/plugins/GhostPlugin'), | |
knex = require('../../../core/server/models/base').Knex, | |
KudosPlugin; | |
KudosPlugin = function (ghost) { |
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
(function($) { | |
/* | |
======== A Handy Little QUnit Reference ======== | |
http://api.qunitjs.com/ | |
Test methods: | |
module(name, {[setup][ ,teardown]}) | |
test(name, callback) | |
expect(numberOfAssertions) | |
stop(increment) |
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
// Garbage collection | |
// below example | |
// change third plugin to angular service | |
// used in most station | |
scope.$on('$destroy', function() { | |
$modal.remove(); | |
}); |
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
// key name | |
var key_names = { | |
32: 'SPACE', | |
13: 'ENTER', | |
9: 'TAB', | |
8: 'BACKSPACE', | |
16: 'SHIFT', | |
17: 'CTRL', | |
18: 'ALT', | |
20: 'CAPS_LOCK', |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>JavaScript Patterns</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script> | |
/*! |
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
// initialied plugin | |
$('.element').pluginName(); | |
$('.element').pluginName({ | |
skin:'your skin', | |
// config | |
..... | |
}); | |
// callback method after initialied | |
$('.element').pluginName('disable'); // call disable 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
function askPassword(callback) { | |
var stdin = process.openStdin(), | |
stdio = process.binding("stdio"); | |
stdio.setRawMode(); | |
console.log('Enter your password:'); | |
var password = ""; | |
stdin.on("data", function(c) { | |
c = c + ""; |
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 fs = require('fs'), | |
url = require('url'), | |
when = require('when'), | |
errors = require('../errorHandling'), | |
path = require('path'), | |
paths = require('./paths'), | |
appRoot = paths().appRoot, | |
configExample = paths().configExample, | |
configFile = process.env.GHOST_CONFIG || paths().config, |
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'; | |
describe('green.inputmask4angular', function () { | |
beforeEach(module('green.inputmask4angular')); | |
var $scope, $compile, elm,$timeout; | |
beforeEach(inject(function ($rootScope, _$compile_,_$timeout_) { | |
$scope = $rootScope; |
OlderNewer