- Create a key pair (see: here if you need help with this step)
- Log into Lightsail and upload your newly created SSH key to the region in which you plan to deploy your VPN server
- Create a new $3.50/mo Ubuntu 16.04 LTS Lightsail instance in your desired location
- Create and attach a static IP address to your new instance
- Log into the newly created instance and run: do-release-upgrade - this will update the 16.04 instance to 18.04
- Follow the directions in README.md to deploy the Algo server, selecting "Install Algo to existing Ubuntu 18.04 server" when prompted and using the user "ubuntu" when asked
- Once Algo finishes installing, log into Lightsail and open UDP ports 500, 4500 and 51820.
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
/* Using jaredly/let-anything */ | |
module Await = { | |
let let_ = (promise, continuation) => | |
promise | |
|> Js.Promise.then_(value => continuation(value) |> Js.Promise.resolve); | |
}; | |
let fetchAsync = { | |
let%Await response = Fetch.fetch("https://swapi.co/api/films/1/"); |
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
/* Works but props not added to values array */ | |
let sayHello = name => | |
LitHtml.html( | |
{j| | |
<h1>Hello $(name) </h1> | |
<p>Goodbye</p> | |
<div> | |
<span>This is nested</span> | |
</div> | |
|j}, |
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
interface Window { | |
ResizeObserver: ResizeObserver; | |
} | |
/** | |
* The ResizeObserver interface is used to observe changes to Element's content | |
* rect. | |
* | |
* It is modeled after MutationObserver and IntersectionObserver. | |
*/ |
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
-- Somewhere in you Elm app you can add editor by adding an empty node with the correct attributes. | |
-- The JS library will be initialized and destroyed automatically! | |
view : Model -> Html Msg | |
view model = | |
div [] | |
[ div | |
[ attribute "data-ace" "" | |
, attribute "data-ace-theme" "monokai" | |
, attribute "data-ace-mode" "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
!function() { | |
var emitter = { | |
emit: console.dir.bind(console) | |
} | |
function emit(mutation) { | |
var target = mutation.target | |
var name = mutation.attributeName | |
var value = target.getAttribute(name) |
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
// FP Lenses | |
const lens = get => set => ({ get, set }); | |
const view = lens => obj => lens.get(obj); | |
const set = lens => val => obj => lens.set(val)(obj); | |
const over = lens => fn => obj => set(lens)(fn(view(lens)(obj)))(obj); | |
const lensProp = key => lens(prop(key))(assoc(key)); |
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
[@bs.module "aws-appsync"] [@bs.new] | |
external makeAWSAppSyncClient : | |
{ | |
. | |
"url": Js.Nullable.t(string), | |
"region": Js.Nullable.t(string), | |
"auth": | |
Js.Nullable.t( | |
{ | |
. |
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
type hoc = ReasonReact.reactClass => ReasonReact.reactClass; | |
[@bs.module "react-apollo"] external graphql : GraphQLTag.definitions => hoc = "graphql"; | |
module type Query = {type data; let query: GraphQLTag.definitions;}; | |
module CreateWrapper = (Query: Query) => { | |
type props = {. "data": Query.data}; | |
let wrapComponent = (~component, ~make) => { | |
let jsComponent = |
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
type selection = { | |
. | |
"alias": string, | |
"arguments": Js.Array.t(string), | |
"directives": Js.Array.t(string), | |
"kind": string, | |
"name": { | |
. | |
"kind": string, | |
"value": string |