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
| cd ~/ffmpeg_sources | |
| git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac | |
| cd fdk-aac | |
| autoreconf -fiv | |
| ./configure --prefix="$HOME/ffmpeg_build" --disable-shared | |
| make | |
| make install | |
| make distclean |
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
| 'use strict'; | |
| angular.module('myApp') | |
| .constant('AUTH_EVENTS', { | |
| loginSuccess: 'auth-login-success', | |
| loginFailed: 'auth-login-failed', | |
| loginCancelled: 'auth-login-cancelled', | |
| logoutSuccess: 'auth-logout-success', | |
| logoutFailed: 'auth-logout-failed', | |
| sessionTimeout: 'auth-session-timeout', | |
| notAuthenticated: 'auth-not-authenticated', |
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
| gulp.task('sass', function() { | |
| gulp.src('./public/scss/*.scss') | |
| .pipe(compass({ | |
| config_file: 'config.rb', | |
| css: 'public/css', | |
| sass: 'public/scss' | |
| })) | |
| .pipe(gulp.dest('./public/css')) | |
| }) |
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
| /** | |
| * @description similar to domReady but for mongoose.connect | |
| * @example | |
| * require('mongoose-ready')(function(err, readyState) { | |
| * // do stuff if readyState > something good. | |
| * }); | |
| */ | |
| var mongoose = require('mongoose'), | |
| cfg = require('./config'), | |
| log = require('./logger'); |
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
| var express = require('express'), | |
| multer = require('multer'), | |
| path = require('path'); | |
| module.exports = function(app) { | |
| app.use('/uploads', express.static(path.join(global.__base, 'uploads'))); | |
| app.use(multer({ dest: './uploads-tmp/'})); | |
| } |
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
| var mongoose = require('mongoose'), | |
| log = require('./logger'), | |
| cfg = require('./config'); | |
| module.exports = exports = function(app) { | |
| mongoose.connect(cfg.MONGO_URI, function(err) { | |
| if (err) { | |
| log.error('lib/mongoose error', err); | |
| log.warn('mongoose.connection.readyState', mongoose.connection.readyState); | |
| } |
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
| var schema = { | |
| /** | |
| * @property DEBUG | |
| */ | |
| DEBUG: { | |
| env: 'DEBUG', | |
| type: 'string', | |
| default: 'none' | |
| }, | |
| /** |
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
| var fs = require('fs-extra'), | |
| path = require('path'), | |
| bunyan = require('bunyan'); | |
| var logDir = path.resolve(path.join('./', 'log')); | |
| fs.ensureDir(logDir); | |
| module.exports = bunyan.createLogger({ | |
| name: 'app-name', |
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
| // borrowed initial version from https://github.com/JacksonGariety/gulp-nodemon/issues/33 | |
| gulp.task('run', ['default', 'watch'], function() { | |
| var nodemon = require('gulp-nodemon'), | |
| spawn = require('child_process').spawn, | |
| bunyan = require('bunyan'); | |
| nodemon({ | |
| script: paths.server, | |
| ext: 'js json', |
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
| var config = require('12factor-config'), | |
| path = require('path'), | |
| fs = require('fs'); | |
| // load .env file from relative ../.env | |
| var envFile = path.join(__dirname, '../', '.env'); | |
| if (fs.existsSync(envFile)) { | |
| var env = require('node-env-file'); | |
| env(envFile, { overwrite: true}); | |
| } |