Skip to content

Instantly share code, notes, and snippets.

View avelinocneto's full-sized avatar

Avelino Neto avelinocneto

View GitHub Profile
@avelinocneto
avelinocneto / 2019-https-localhost.md
Created March 12, 2025 23:18 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

{
"workbench.startupEditor": "none",
"workbench.colorTheme": "Min Dark",
"dart.flutterSdkPath": "C:\\flutter\\flutter",
"security.workspace.trust.untrustedFiles": "open",
"git.openRepositoryInParentFolders": "never",
"git.autofetch": true,
"git.enableSmartCommit": true,
"explorer.confirmDelete": false,
"dart.flutterCreateOrganization": null,
ip=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
echo "Code Server"
echo "http://$ip:8443"
security_group=$(ec2-metadata -s | cut -d " " -f 2);
aws ec2 authorize-security-group-ingress --group-name $security_group --protocol tcp --port 8443 --cidr 0.0.0.0/0
version="1.32.0-310"
wget https://github.com/codercom/code-server/releases/download/$version/code-server-$version-linux-x64.tar.gz
tar -xvzf code-server-$version-linux-x64.tar.gz
cd code-server-$version-linux-x64
chmod +x code-server