Skip to content

Instantly share code, notes, and snippets.

Avatar
🙈

Antonio Campos antoniocampos

🙈
View GitHub Profile
@antoniocampos
antoniocampos / AddToYour.ovpn
Last active January 27, 2023 12:11
Solve problems accessing a windows domain or apply group policies on a client using OpenVpn
View AddToYour.ovpn
; add this lines to your .ovpn
; replace x.x.x.x with your local dns servers (the server that "know" the domain)
dhcp-option DNS x.x.x.x
dhcp-option DNS x.x.x.x
; replace antoniocampos.net by your local domain
dhcp-option DOMAIN antoniocampos.net
dhcp-option ADAPTER_DOMAIN_SUFFIX antoniocampos.net
; more important!!
block-outside-dns
@antoniocampos
antoniocampos / Install.sh
Last active January 27, 2023 12:11
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 January 27, 2023 12:11
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 March 12, 2020 15:38
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 March 12, 2020 14:56
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 January 27, 2023 12:11
.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 January 27, 2023 12:12 — forked from davidfowl/dotnetlayout.md
.NET project structure
View dotnetlayout.md
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
  tests/
@antoniocampos
antoniocampos / suppliers.txt
Created February 5, 2019 21:19
DropShipping List
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