- Don't run as root.
- For sessions, set
httpOnly(andsecuretotrueif running over SSL) when setting cookies. - Use the Helmet for secure headers: https://github.com/evilpacket/helmet
- Enable
csrffor preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrf - Don't use the deprecated
bodyParser()and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use thedeferproperty andpipe()the multipart upload stream to the intended destination.
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
| import android.arch.lifecycle.ViewModel | |
| import android.arch.lifecycle.ViewModelProvider | |
| import android.arch.lifecycle.ViewModelStore | |
| import android.arch.lifecycle.ViewModelStores | |
| import android.support.v4.app.Fragment | |
| import android.support.v4.app.FragmentActivity | |
| import java.util.concurrent.atomic.AtomicBoolean | |
| /** | |
| * Created by Nikola on 7/19/2017. |
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
| async.parallel({ | |
| card_count: function (cb) { | |
| db | |
| .Card | |
| .findAll({ | |
| where: {course_id: 'some id'} | |
| }) | |
| .then(function (results) { | |
| var t = []; | |
| results.forEach(function (result) { |
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
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
| /** | |
| * Modify the parts you need to get it working. | |
| */ | |
| var should = require('should'); | |
| var request = require('../node_modules/request'); | |
| var io = require('socket.io-client'); | |
| var serverUrl = 'http://localhost'; |