This file contains 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
ssh -J root@your-jumpbox root@your_server -L 8080:127.0.0.1:8080 | |
-L remoteport:host:localhost | |
Alternative, we can setup sshconfig for jummhost |
This file contains 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
'use strict'; | |
var xoauth2 = require('xoauth2'); | |
var nodemailer = require('nodemailer'); | |
var smtp = require('nodemailer-smtp-transport'); | |
var htmlToText = require('nodemailer-html-to-text').htmlToText; | |
// Sending mail with Gmail using XOAuth2 | |
// http://masashi-k.blogspot.com.br/2013/06/sending-mail-with-gmail-using-xoauth2.html |
This file contains 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 json | |
import os | |
def ping(event, context): | |
ip1 = event['headers']['X-Forwarded-For'].split(',')[0] | |
ip2 = event['requestContext']['identity']['sourceIp'] | |
print('two different referring IP address parsing techniques ip1: %s and ip2: %s') % (ip1, ip2) | |
referringIP = event['requestContext']['identity']['sourceIp'] | |
#TODO: use a comma-delimited string to store multiple IP address values in the environment variable |
This file contains 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
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
This file contains 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
rsync --no-perms --omit-dir-times --delete -vr -e "ssh -i /home/teamcity/.ssh/id_rsa_custom" --timeout=1000 --log-file=/tmp/rsyncd.log ./build/ ci@server:/var/www/build/ | |
rsync --no-perms --omit-dir-times -vr -e "ssh -i /home/teamcity/.ssh/id_rsa_custom" --timeout=1000 --log-file=/tmp/rsyncd.log ./node_modules/ ci@server:/var/www/node_modules/ | |
rm -f .env.production.local | |
cat >.env.production.local <<'EOL' | |
AAA=VVVV/ | |
BBB=XXXX | |
EOL | |
cat .env.production.local |
This file contains 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
Show hidden characters
{ | |
"presets": ["es2015"], | |
"plugins": ["transform-runtime"] | |
} |