behaviour_info(callbacks) ->
[
{api_version,0},
RingToFile = fun(InputFile,OutputFile) ->
{ok,Data} = file:read_file(InputFile),
T = binary_to_term(Data),
{ok,Handle} = file:open(OutputFile,[write,append]),
Line = io_lib:format("~p", [T]),
file:write(Handle, Line),
file:close(Handle)
end.
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
user www-data; | |
worker_processes 4; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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
#! /usr/bin/env escript | |
%% -*- mode: erlang -*- | |
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ts=4 sw=4 ft=erlang et | |
%% | |
%% Copyright 2016 Operable, Inc. All Rights Reserved. | |
%% | |
%% This file is provided to you under the Apache License, | |
%% Version 2.0 (the "License"); you may not use this file |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
This setup is for remote users to connect into an office/home LAN using a VPN (ipsec). This is based on (but not the same as) the strongSwan documentation and this guide: https://raymii.org/s/tutorials/IPSEC_vpn_with_Ubuntu_16.04.html
I used strongSwan 5.5.1.
apt-get install -y strongswan strongswan-pki