Node Upload S3 folder

Source: https://www.zeolearn.com/magazine/uploading-files-to-aws-s3-using-nodejs

Bucket is name of your bucket and key is name of subfolder. So, if your bucket name is “test-bucket” and you want to save file in “test-bucket/folder/subfolder/file.csv”, then value of Key should be “folder/subfolder/file.csv”.

Can't bind to 'routerLink' since it isn't a known property

Source: https://stackoverflow.com/questions/42035387/cant-bind-to-routerlink-since-it-isnt-a-known-property

You need to add RouterModule to imports of every @NgModule() where components use any component or directive from (in this case routerLink and <router-outlet>.
declarations: [] is to make components, directives, pipes, known inside the current module.
exports: [] is to make components, directives, pipes, available to importing modules. What is added to declarations only is private to the module. exports makes them public.

Select element based on multiple classes

Source: https://stackoverflow.com/questions/2554839/select-element-based-on-multiple-classes

You mean two classes? "Chain" the selectors (no spaces between them):
.class1.class2 {
    /* style here */
}
This selects all elements with class1 that also have class2.
In your case:
li.left.ui-class-selector {

}
Official documentation : CSS2 class selectors.

bootstrap dropdown bubble align right (not push-right)

Source: https://stackoverflow.com/questions/18892351/bootstrap-dropdown-bubble-align-right-not-push-right

Bootstrap 3.1+
Adding the class .dropdown-menu-right to the same div containing the class dropdown-menu:
<div class="dropdown-menu dropdown-menu-right">
    STUFF
</div>
Bootstrap 2.3 & 3.0
Add the class .pull-right to the same div containing the class dropdown-menu
<div class="dropdown-menu pull-right">
    STUFF
</div>
This seems to work for me using bootstrap 3.0

Download a file from NodeJS Server using Express

Source:

Update

Express has a helper for this to make life easier.
app.get('/download', function(req, res){
  const file = `${__dirname}/upload-folder/dramaticpenguin.MOV`;
  res.download(file); // Set disposition and send it.
});

Old Answer

As far as your browser is concerned, the file's name is just 'download', so you need to give it more info by using another HTTP header.
res.setHeader('Content-disposition', 'attachment; filename=dramaticpenguin.MOV');
You may also want to send a mime-type such as this:
res.setHeader('Content-type', 'video/quicktime');
If you want something more in-depth, here ya go.
var path = require('path');
var mime = require('mime');
var fs = require('fs');

app.get('/download', function(req, res){

  var file = __dirname + '/upload-folder/dramaticpenguin.MOV';

  var filename = path.basename(file);
  var mimetype = mime.lookup(file);

  res.setHeader('Content-disposition', 'attachment; filename=' + filename);
  res.setHeader('Content-type', mimetype);

  var filestream = fs.createReadStream(file);
  filestream.pipe(res);
});
You can set the header value to whatever you like. In this case, I am using a mime-type library - node-mime, to check what the mime-type of the file is.
Another important thing to note here is that I have changed your code to use a readStream. This is a much better way to do things because using any method with 'Sync' in the name is frowned upon because node is meant to be asynchronous.

Automated MySQL backups to S3 with node.js

Source: https://gist.github.com/maximilianschmitt/680abefef40ebd341635

'use strict';
var mysqlBackup = require('./mysql-backup');
var schedule = require('node-schedule');
schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup);


'use strict';
var spawn = require('child_process').spawn;
var s3Upload = require('s3-stream-upload');
var config = require('../config');
var Promise = require('bluebird');
var moment = require('moment');
var mysqlBackup = function() {
var upload = s3Upload({
accessKeyId: config.aws.accessKey,
secretAccessKey: config.aws.secretKey,
Bucket: config.aws.buckets.backup.name,
region: config.aws.buckets.backup.region
});
var s3 = upload({ Key: 'mysql-backup-' + moment().format('YYYY-MM-DD-HH-mm-ss') + '.sql' });
var mysqldump = spawn('mysqldump', [
'-u', config.db.connection.user,
'-p' + config.db.connection.password,
config.db.connection.database
]);
return new Promise(function(resolve, reject) {
mysqldump
.stdout
.pipe(s3)
.on('finish', function() {
resolve();
})
.on('error', function(err) {
reject(err);
});
});
};
module.exports = mysqlBackup;

Cold Turkey Blocker

 https://superuser.com/questions/1366153/how-to-get-rid-of-cold-turkey-website-blocker-get-around-the-block Very old question, but still wan...