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
npm i -D ngrok | |
if (process.env.IS_OFFLINE) { | |
const ngrok = require('ngrok'); | |
let ngrokUrl = await Environment.getNgrokUrl(); | |
if (!ngrokUrl) { | |
ngrokUrl = await ngrok.connect(3000); | |
} | |
return { | |
replyUrl: `${ngrokUrl}/api/v1/...`, |
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 System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
class AES | |
{ | |
public static string Encrypt(string plainText, string keyString) | |
{ | |
byte[] cipherData; |
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
{ | |
"watch": [ | |
"src" | |
], | |
"ext": "ts", | |
"ignore": [ | |
"src/**/*.spec.ts" | |
], | |
"exec": "ts-node ./src/app.ts" | |
} |
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
Geração de certificado SSL com o Let's Encrypt | |
#1) Instalação | |
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
sudo apt-get install certbot | |
#2) Geração de um novo certificado |
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
cd /opt/f5/vpn/lib | |
sudo mv libssl.so.1.0.0 libssl.so.1.0.0_old | |
sudo mv libcrypto.so.1.0.0 libcrypto.so.1.0.0_old | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.1 libssl.so.1.0.0 | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 libcrypto.so.1.0.0 |
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
1. Install VirtualBox | |
- wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - | |
- wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - | |
- sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian `lsb_release -cs` contrib" | |
- sudo apt-get update | |
- sudo apt-get install virtualbox-5.2 | |
- # WARNING load kernel modules - modprob vboxdrv | |
- # sudo /sbin/rcvboxdrv setup | |
- # sudo /sbin/vboxconfig | |
- # sudo apt-get install dkms |
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
mkdir app-node #app_name | |
cd app-node #app_name | |
npm init -y | |
npm i --save-dev ts-node | |
npm i --save-dev @types/node | |
npm i --save typescript | |
tsc --init | |
echo "require('ts-node/register');" >> index.js | |
echo "require('./src/main');" >> index.js | |
mkdir src |