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
files: | |
"/etc/nginx/conf.d/01_proxy.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
client_max_body_size 10M; | |
container_commands: | |
01_reload_nginx: |
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
FROM node:argon | |
# Install softwares | |
RUN apt-get update && \ | |
apt-get install -y openjdk-7-jdk | |
# Create app directory | |
RUN mkdir -p /iconapp | |
WORKDIR /iconapp |
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
/** | |
* @package [db] - Application db connection & schema loading | |
* @author [anikett] smartData Inc | |
*/ | |
'use strict'; | |
/* DB */ | |
var mongoose = require('mongoose'); | |
mongoose.Promise = Promise; |
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 params = { | |
input: outputHtmlFile, | |
output: outputPdf | |
}; | |
generatePDF(params, function(err, response) { | |
if (err) { | |
callback('Unable to generate PDF'); | |
} else { | |
} |
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 awsSdk = require('aws-sdk'); | |
awsSdk.config.update({ | |
accessKeyId: 'ACCESS_KEY_ID', | |
secretAccessKey: 'SECRET_ACCESS_KEY' | |
}); | |
/** | |
* [sendSMS - Send SMS to given number] |
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
Request error : | |
XMLHttpRequest cannot load https://subdomain.domain.com/api/campaign/auth/twitter. Response to preflight request doesn't pass access control check: A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'https://subdomain2.domain.com' is therefore not allowed access. | |
Solution : | |
var whitelist = ['https://subdomain.domain.com', 'https://subdomain2.domain.com']; | |
// All api requests | |
app.use(function (req, res, next) { | |
var origin = req.headers.origin; | |
if(whitelist.indexOf(origin) > -1){ | |
res.header('Access-Control-Allow-Origin', origin); |
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 nodemailer = require('nodemailer'); | |
var sesTransport = require('nodemailer-ses-transport'); | |
var transport = nodemailer.createTransport(sesTransport({ | |
accessKeyId: "", | |
secretAccessKey: "", | |
region : 'us-west-2' | |
})); | |
var inputData = { |
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
index.html | |
--------------------------------------------------------------------------------------------------------------------------- | |
<link href="public/assets/owl_carousel/owl.carousel.css" rel="stylesheet"> | |
<link href="public/assets/owl_carousel/owl.theme.css" rel="stylesheet"> | |
<script src="public/assets/owl_carousel/owl.carousel.min.js"></script> | |
<div id="owl-example" class="owl-carousel"> | |
<div ng-repeat="item in fbAlbumImages" ng-repeat-owl-carousel carousel-init="carouselInitializer"> | |
<img ng-src="{{item.source}}" alt="image" width="250"> |
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
index.html | |
--------------------------------------------------------------------------------------------------------------------------- | |
<link href="public/assets/owl_carousel/owl.carousel.css" rel="stylesheet"> | |
<link href="public/assets/owl_carousel/owl.theme.css" rel="stylesheet"> | |
<script src="public/assets/owl_carousel/owl.carousel.min.js"></script> | |
<data-owl-carousel class="owl-carousel" data-options="owlOptionsTestimonials"> | |
<div owl-carousel-item="" ng-repeat="item in fbAlbumImages" class="item"> | |
<img ng-src="{{item.source}}" alt="image" width="250"> |
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
index.html | |
--------------------------------------------------------------------------------------------------------------------------- | |
<link href="public/assets/owl_carousel/owl.carousel.css" rel="stylesheet"> | |
<link href="public/assets/owl_carousel/owl.theme.css" rel="stylesheet"> | |
<script src="public/assets/owl_carousel/owl.carousel.min.js"></script> | |
<wrap-owlcarousel class="owl-carousel" data-options="owlOptionsTestimonials"> | |
<div class="item">1</div> | |
<div class="item">2</div> | |
<div class="item">3</div> |