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
app.use(function (req, res, next) { | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT'); | |
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type, Authorization'); | |
res.setHeader('Access-Control-Allow-Headers', 'x-access-token, token'); | |
next(); | |
}); |
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
//--------------------------------------------------------------------- | |
// QRCode for JavaScript | |
// | |
// Copyright (c) 2009 Kazuhiko Arase | |
// | |
// URL: http://www.d-project.com/ | |
// | |
// Licensed under the MIT license: | |
// http://www.opensource.org/licenses/mit-license.php | |
// |
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
(function( $ ){ | |
$.fn.qrcode = function(options) { | |
// if options is string, | |
if( typeof options === 'string' ){ | |
options = { text: options }; | |
} | |
// set default values | |
// typeNumber < 1 for automatic calculation | |
options = $.extend( {}, { |
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 storage = multer.diskStorage({ | |
destination: function (req, file, callback) { | |
callback(null, './uploadssss'); | |
}, | |
filename: function (req, file, callback) { | |
callback(null, file.fieldname + '-' + Date.now() + '.jpeg') | |
}, | |
}); |
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'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var http = require('http'); | |
//var routes = require('./routes/index'); | |
var multer = require('multer'); |
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
#!/bin/bash | |
# Ubuntu Developer Script For complete installation of ubuntu 15 | |
# | |
# chmod 775 thescript.sh | |
#sudo ./thescript.sh | |
# | |
# | |
# Downloads and configures the following: | |
# | |
# Java JDK |
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
app.use(function(req, res, next) { | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Allow-Methods', 'GET, POST'); | |
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type, Authorization'); | |
next(); | |
}); |
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
module.exports.apply = function(app) { | |
var CORS = require('connect-cors'); | |
var options = { | |
origin: '*', | |
methods: ['GET', 'POST', 'PUT'], | |
headers: [ | |
'Authorization', | |
'x-access-token' | |
], |
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
// set up plain http server | |
var http = express.createServer(); | |
// set up a route to redirect http to https | |
http.get('*',function(req,res){ | |
res.redirect('https://mydomain.com'+req.url) | |
}) | |
// have it listen on 8080 | |
http.listen(8080); |
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
jQuery(document).ready(function() { | |
//toggle `popup` / `inline` mode | |
$.fn.editable.defaults.mode = 'popup'; | |
function getSource() { | |
var url = "/api/rpc/payments/status_options"; | |
return $.ajax({ | |
type: 'GET', | |
async: true, |