Skip to content

Instantly share code, notes, and snippets.

View antoniocampos's full-sized avatar
🙈

Antonio Campos antoniocampos

🙈
View GitHub Profile
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0" processorArchitecture="*"

Open regedit.exe as an Administrator and navigate to the registry key:

HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > SideBySide.

Right-click the right pane and choose NEW > DWORD (32 bit) Value.

Type PreferExternalManifest, and then press ENTER.

Right-click PreferExternalManifest, and then click Modify.

@antoniocampos
antoniocampos / .htaccess
Created March 21, 2017 17:35
.htaccess force www.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^antoniocampos.net [NC]
RewriteRule ^(.*)$ http://www.antoniocampos.net/$1 [L,R=301,NC]
@antoniocampos
antoniocampos / .htaccess
Last active April 28, 2017 16:15
Redirect all requests to PHP
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?ParaMeter=$1 [NC,L,QSA]
@antoniocampos
antoniocampos / PlaySound.html
Last active June 1, 2017 16:46
Javascript PlaySound
<!DOCTYPE html>
<html>
<head>
<title>Javascript Play Sound</title>
<script src="playsound.js"></script>
</head>
<body>
<a href="#" onclick="PlaySound()">Play</a>
</body>
</html>
@antoniocampos
antoniocampos / debian10+apache2+mariadb+php
Created March 12, 2020 14:56
Debian 10 Install 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 / iptables-blocktype.conf
Last active March 10, 2021 16:37
Fail2Ban DROP instead REJECT
#Depending on version one of the following files must exist
root@host:/ nano /etc/fail2ban/action.d/iptables-blocktype.conf
or
root@host:/ nano /etc/fail2ban/action.d/iptables-common.conf
comment the line
@antoniocampos
antoniocampos / SolveCRLExpired.sh
Last active October 4, 2022 17:59
Solve OpenVPN 2.4 Error = CRL has expired
#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"
@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
; 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
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!