Skip to content

Instantly share code, notes, and snippets.


Antonio Campos antoniocampos

View GitHub Profile
antoniocampos /
Last active May 20, 2021
Debian 10 install and configure Microsoft SQL Server 2019 and tools
apt install curl apt-transport-https gnupg
curl | sudo apt-key add -
curl | tee /etc/apt/sources.list.d/msprod.list
curl | tee /etc/apt/sources.list.d/msprod.list
apt-get update
apt-get install -y mssql-server mssql-tools unixodbc-dev
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
source ~/.bashrc
/opt/mssql/bin/mssql-conf setup
# follow the steps!
antoniocampos /
Last active Sep 12, 2020
Python validar SAF-T_PT 1.04_01
  • Se ainda não tens... instala o python

  • depois fazes download do ficheiro

  • e também do saftpt1.04_01.xsd

  • mete ambos numa pasta

  • para ser mais simples arrasta o ficheiro do saft para cima do

  • o processo de validação vai iniciar, caso haja algum erro aparece o motivo do erro e o valor com erro!

antoniocampos /
Created Mar 12, 2020
Debian Install .net core 3.1
apt install gpg
wget -qO- | gpg --dearmor > microsoft.asc.gpg
mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q
mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
chown root:root /etc/apt/sources.list.d/microsoft-prod.list
apt-get update
apt-get install apt-transport-https
apt-get update
antoniocampos / debian10+apache2+mariadb+php
Created Mar 12, 2020
Debian 10 Install Apache2 + Mariadb + PHP
View debian10+apache2+mariadb+php
# install apache
apt-get install apache2
# install MariaDB
apt install mariadb-server
# configure MariaDb root Password
# install php and configure apache
apt install php libapache2-mod-php php-gd php-mysql php-pear libgd-tools
antoniocampos / MyService.service
Last active Jun 11, 2020
.net Core Systemd Service Example (Linux autostart you .net app)
View MyService.service
Description=MyService Description
ExecStart=/usr/bin/dotnet /path/to/app/App.dll
# Restart service after 10 seconds if the dotnet service crashes:
antoniocampos /
Last active Feb 28, 2019 — forked from davidfowl/
.NET project structure
View suppliers.txt
Here are 30 different suppliers:
1 – Oberlo verified suppliers or US
2 – DX .com– A.K.A. Deal Extreme has been around for many years and has some amazing products that you could sell with great margins.
3 – WholesaleCentral .com– One of the most comprehensive list of free drop shippers which you could find in virtually any niche. They are also free.
4 – FragranceNet – This is a great source if you are looking to sell perfumes and fragrances.
5 – Vitabase– A great source to supply vitamins for skin, health and beauty drop shipped products.
6 – DressLink .com– A great source if you plan on selling dresses with amazing margins.
7 – Tiny Deal – Similar to DX but you could find unique products as well.
8 – Milanoo– A great supplier of wedding dresses, prom dresses.
9 – Dino Direct – Another awesome source for electronic products and gadgets.
View Mariadb Force Root Password
sudo mysql -u root
[mysql] use mysql;
[mysql] update user set plugin='' where User='root';
[mysql] flush privileges;
[mysql] \q
View Mariadb Force Root Password
sudo mysql -u root
[mysql] use mysql;
[mysql] update user set plugin='' where User='root';
[mysql] flush privileges;
[mysql] \q
antoniocampos /
Last active Apr 21, 2020
Solve OpenVPN 2.4 Error = CRL has expired
#OpenVPN 2.4 no longer accepts CRLs who's nextUpdate field lies in the past.
# 2017
# no need for any change at the client side
# you may want to increase the CRL EXPIRE period
# just increase the value default_crl_days = ?? in the openssl.cnf
# tested with Debian 9 and OpenVPN 2.4
cd /etc/openvpn/2.0/
export KEY_CN="My VPN Server"
export KEY_OU="IT Dep"