Using AWS Linux setup an L2TP/IPSEC Soft Ether VPN
Consider HVM (SSD) EBS-Backed 64-bit m3.medium
-
us-east-1 => ami-1ecae776
-
Updates and dependencies
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install docker git wget
(function(){ | |
var parse = JSON.parse; | |
JSON = { | |
stringify: JSON.stringify, | |
validate: function(str){ | |
var aws = require('aws-sdk'); | |
aws.config.update({ | |
accessKeyId: 'YOUR_ACCESS_KEY', | |
secretAccessKey: 'YOUR_SECRET_KEY', | |
region: 'us-west-2' | |
}); | |
var ec2 = new aws.EC2(); |
var stringify = function(obj, prop) { | |
var placeholder = '____PLACEHOLDER____'; | |
var fns = []; | |
var json = JSON.stringify(obj, function(key, value) { | |
if (typeof value === 'function') { | |
fns.push(value); | |
return placeholder; | |
} | |
return value; | |
}, 2); |
var isoCountries = { | |
'AF' : 'Afghanistan', | |
'AX' : 'Aland Islands', | |
'AL' : 'Albania', | |
'DZ' : 'Algeria', | |
'AS' : 'American Samoa', | |
'AD' : 'Andorra', | |
'AO' : 'Angola', | |
'AI' : 'Anguilla', | |
'AQ' : 'Antarctica', |
/** | |
* Based on @ericprieto code https://github.com/strongloop/loopback/issues/651#issuecomment-140879983 | |
* place this file into common/mixins/disableAllMethods.js | |
* | |
**/ | |
module.exports = function(Model, options) { | |
if(Model && Model.sharedClass) { | |
var methodsToExpose = options.expose || []; |
Consider HVM (SSD) EBS-Backed 64-bit m3.medium
us-east-1 => ami-1ecae776
Updates and dependencies
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install docker git wget
// based on https://github.com/strongloop/loopback/issues/651#issuecomment-259540469 | |
'use strict'; | |
const | |
relationMethodPrefixes = [ | |
'prototype.__findById__', | |
'prototype.__destroyById__', | |
'prototype.__updateById__', | |
'prototype.__exists__', |
Known Issues: On High Sierra there are problems related to the screen brightness and sleep issues.
Author: Chris
Date: 2017-02-17
線上MarkDown編輯器
#!/bin/sh | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.sh |