Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
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
import re | |
import sys | |
import requests | |
import gitlab | |
URL = 'https://gitlab.com' | |
SIGN_IN_URL = 'https://gitlab.com/users/sign_in' |
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
/** | |
* Autowire Quartz Jobs with Spring context dependencies | |
* @see http://stackoverflow.com/questions/6990767/inject-bean-reference-into-a-quartz-job-in-spring/15211030#15211030 | |
*/ | |
public final class AutowiringSpringBeanJobFactory extends SpringBeanJobFactory implements ApplicationContextAware { | |
private transient AutowireCapableBeanFactory beanFactory; | |
public void setApplicationContext(final ApplicationContext context) { | |
beanFactory = context.getAutowireCapableBeanFactory(); | |
} |
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
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.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
/*jshint strict:false*/ | |
/*global CasperError console phantom require*/ | |
/** | |
* grab links and push them into xml | |
*/ | |
var casper = require("casper").create({ | |
}); |
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
var util = require('util'); | |
var events = require('events'); | |
function Promise(done) { | |
Promise.super_.call(this); | |
this.results = null; | |
this.errors = null; | |
this.ended = false; |