Skip to content

Instantly share code, notes, and snippets.

Avatar
🙈

Antonio Campos antoniocampos

🙈
View GitHub Profile
@antoniocampos
antoniocampos / Install.sh
Last active May 20, 2021
Debian 10 install and configure Microsoft SQL Server 2019 and tools
View Install.sh
apt install curl apt-transport-https gnupg
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/debian/10/prod.list | tee /etc/apt/sources.list.d/msprod.list
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | 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
antoniocampos / readme.md
Last active Sep 12, 2020
Python validar SAF-T_PT 1.04_01
View readme.md
  • Se ainda não tens... instala o python https://www.python.org/downloads/

  • depois fazes download do ficheiro validar.py

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

  • mete ambos numa pasta

  • para ser mais simples arrasta o ficheiro do saft para cima do validar.py

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

@antoniocampos
antoniocampos / install.net
Created Mar 12, 2020
Debian Install .net core 3.1
View install.net
apt install gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/10/prod.list
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
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
mysql_secure_installation
# install php and configure apache
apt install php libapache2-mod-php php-gd php-mysql php-pear libgd-tools
@antoniocampos
antoniocampos / MyService.service
Last active Jun 11, 2020
.net Core Systemd Service Example (Linux autostart you .net app)
View MyService.service
[Unit]
Description=MyService Description
[Service]
WorkingDirectory=/path/to/app/
ExecStart=/usr/bin/dotnet /path/to/app/App.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
@antoniocampos
antoniocampos / dotnetlayout.md
Last active Feb 28, 2019 — forked from davidfowl/dotnetlayout.md
.NET project structure
View dotnetlayout.md
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
  tests/
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
antoniocampos / SolveCRLExpired.sh
Last active Apr 21, 2020
Solve OpenVPN 2.4 Error = CRL has expired
View SolveCRLExpired.sh
#OpenVPN 2.4 no longer accepts CRLs who's nextUpdate field lies in the past.
#
# me@antoniocampos.net 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"