Run the following in your client machine
ssh -R EXPOSED_PORT:localhost:SERVICE_PORT USER@HOST
Where
- EXPOSED_PORT is the port exposed to the internet in the proxy server
- SERVICE_PORT is the port your application is listening in your machine
// Install uue decoder: | |
// npm install uue | |
var message = | |
'This is a message with uuencoded attachment\n' + | |
'\n' + | |
'begin 644 cat.txt\n' + | |
'#0V%T\n' + | |
'`\n' + | |
'end\n'; |
{ | |
"plugins": ["ID", "X-GM-EXT-1", "XOAUTH2", "STARTTLS", "SASL-IR", "AUTH-PLAIN", "NAMESPACE", "IDLE", "ENABLE", "CONDSTORE", "XTOYBIRD", "LITERALPLUS", "UNSELECT", "SPECIAL-USE", "CREATE-SPECIAL-USE"], | |
"debug": true, | |
"secureConnection": true, | |
"port": 993, | |
"smtpPort": 465, | |
"users": { | |
"testuser": { | |
"password": "testpass", | |
"xoauth2": { |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX+dz7lssGpOWQBpq0+F9E0mrBnZx4NKdo/7vxF2ppybutKr6a5mN0oeu/EkUGdjJol7tGxmHqvmZUrXkwH1ZUfAQ6HTY3kl6YPiFhCWmypN/jfqPQke9vz1RVzaqjf92zoJITlOdaEmQqoAF0Lj+WZNsu83wVUSvlCdvLLgFKqVyQlCWRJ+cm/iCAGSo+47Qj2zqiN0WGURaFN6Cf8p+tzRUyvsZDaFCjNtmXZPay8IqzplysWZNiqRkkDDJeY87uyQGenMK785khcG+26F/dDyaK/q3mMSJuQaVHGs90pNCclLuAcTOtz/VO2hgNVBPFJROWH5bp2dlLd1n0kTqd [email protected] |
'use strict'; | |
// npm install nodemailer nodemailer-smtp-pool | |
var nodemailer = require('nodemailer'); | |
var smtpPool = require('nodemailer-smtp-pool'); | |
// Create a SMTP transporter object | |
var transport = nodemailer.createTransport(smtpPool({ | |
host: 'smtp.gmail.com', | |
port: 465, | |
secure: true, |
'use strict'; | |
// Nodemailer: v2.0.0 | |
// Ubuntu: 14.04 | |
// node: v5.5.0 | |
// npm: 3.3.12 | |
var nodemailer = require('nodemailer'); | |
var transporter = nodemailer.createTransport({ | |
service: 'Mandrill', |
'use strict'; | |
var nodemailer = require('nodemailer'); | |
var smtp = require('nodemailer-smtp-transport'); | |
var options = { | |
service: 'gmail', | |
auth: { | |
user: 'username', | |
pass: 'password' |
/* eslint-env browser */ | |
/* eslint no-bitwise: 0, no-console: 0*/ | |
'use strict'; | |
function binSearch(haystack, needle, comparator, low, high) { | |
var mid, cmp; | |
if (low === undefined) { | |
low = 0; |
Simple script to replace domain name in a Wordpress MySQL dump file. In addition to replacing domain names in standard string values, the script is able to correctly replace strings in serialized PHP values. This means that it should be safe to operate on data from wp_options table where plugins store data as serialized PHP
Run the script from command line. First argument is the domain name to replace and the second is the replacement. SQL dump is read from stdin and written to stdout
node wp-domain-change.js "http://source.domain" "http://dest.domain" < input.sql > output.sql
Logi SSH kaudu oma virtuaalhosti sisse ja tekita oma juurkausta (st. see kuhu peale ssh logimist satud, n. /data01/virt12345
) allpool näidatud failid mailtrain.json ja mailtrain.toml (viimast faili tuleks enne salvestamist veidi muuta, nimelt tuleks üle vaadata MySQL ja Redis parameetrid vastavalt oma konto seadistusele).
Andmebaasitabeleid seadistada vms. ei ole vaja, seda teeb Mailtrain esimesel käivitusel automaatselt.