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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>hello phaser!</title> | |
| <script src="./node_modules/phaser-ce/build/phaser.min.js"></script> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> |
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
| $ openssl s_client -connect 127.0.0.1:465 | |
| CONNECTED(00000003) | |
| 140640946747032:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:794: | |
| --- | |
| no peer certificate available | |
| --- | |
| No client certificate CA names sent | |
| --- | |
| SSL handshake has read 7 bytes and written 305 bytes | |
| --- |
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
| $ openssl s_client -connect 127.0.0.1:465 -starttls smtp | |
| CONNECTED(00000003) | |
| depth=0 CN = zhillb.xyz | |
| verify error:num=20:unable to get local issuer certificate | |
| verify return:1 | |
| depth=0 CN = zhillb.xyz | |
| verify error:num=21:unable to verify the first certificate | |
| verify return:1 | |
| --- | |
| Certificate chain |
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 = { | |
| foo: 'bar', | |
| num: 22, | |
| items: [ | |
| 'item1', 'item2', 'item3' | |
| ], | |
| }; |
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 every(array, callbackFunction) { | |
| var doesEveryElementMatch = true; | |
| array.forEach(function(element) { | |
| doesEveryElementMatch = callbackFunction(element); | |
| }); | |
| return doesEveryElementMatch; | |
| } |
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
| const AWS = require('aws-sdk'); | |
| const s3 = new AWS.S3(); | |
| var Bucket; | |
| function bucketNameIsUndefined() { | |
| if (!Bucket) { | |
| return true; |
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
| const defaults = { | |
| Bucket: '', | |
| DB: 'Mail', | |
| Save: { | |
| headers: false, | |
| subject: true, | |
| from: true, | |
| to: true, | |
| cc: true, | |
| bcc: true, |
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
| const fs = require('fs'); | |
| module.exports.getFiles = function() { | |
| return new Promise((resolve, reject) => { | |
| fs.readFile('/home/usr', (err, data) => { | |
| if (err) { | |
| reject(err); | |
| } | |
| else { | |
| resolve(data); |
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
| const bucket = require('./bucket'); | |
| const configure = require('./config'); | |
| const db = require('./db'); | |
| const parse = require('./parseMail'); | |
| let config; | |
| const processNewMail = function(optionalCallback) { | |
| if (config.Bucket === '') { | |
| throw new Error('Bucket name must be set!'); |
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
| const bcrypt = require('bcrypt'); | |
| // const jwt = require('jsonwebtoken'); | |
| const User = require('../models/user'); | |
| async function authenticateUser(username, password) { | |
| const users = await User.find({ username }); | |
| if (users.length) { | |
| const user = users[0]; | |
| const samePassword = await checkPassword(password, user.password); | |
| return samePassword; |
OlderNewer