Skip to content

Instantly share code, notes, and snippets.

View humbertodias's full-sized avatar

Humberto Dias humbertodias

View GitHub Profile
@humbertodias
humbertodias / gist:e44b9413f22e3990118306f189cbbf45
Created December 30, 2016 19:29
Docker for Windows - Hardware assisted virtualization and data execution protection must be enabled in the BIOS
Hardware assisted virtualization and data execution protection must be enabled in the BIOS
http://stackoverflow.com/questions/39684974/docker-for-windows-error-hardware-assisted-virtualization-and-data-execution-p
If the features described are enabled the problem is with Hyper-V that is disabled or Hypervisor agent not running
Open PowerShell as administrator and
a) Enable Hyper-V with
# Start PostFix
sudo launchctl start org.postfix.master
# Send
mail -s testing your_local_user@gmail.com
# Check email
mail
# QEmu
brew install qemu
# Home for out tests
mkdir ~/arm-emu
cd ~/arm-emu
# Download initrd and kernel
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-armel/current/images/versatile/netboot/initrd.gz
# clean brew cache
brew cleanup -s
@humbertodias
humbertodias / gist:3138cf7753b6814d37b606764fb9efaf
Created March 19, 2017 13:06
Exporting Mysql server to internet
# tunnel online
ngrok tcp 3306
# connection
user=root
pass=techne
host=0.tcp.ngrok.io
port=16799
mysql -u$user -h$host -P$port -p$pass
ovftool "c:\path\to\original_vm.vmx" "c:\path\to\export.ovf"
# https://www.maketecheasier.com/convert-virtual-machines-vmware-virtualbox/
@humbertodias
humbertodias / gist:3a938bcb3cb785451f2071c76a33d189
Last active December 9, 2017 05:43
Linux fix for resolv.conf
How can I flush the DNS on Ubuntu?
sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
reboot
# Source
https://askubuntu.com/questions/974477/systemds-implementation-of-dns-is-not-resolving-names
@humbertodias
humbertodias / Counting files by extension
Created January 1, 2018 16:06
Counting files by extension
find . -type f | sed -n 's/..*\.//p' | sort | uniq -c
@humbertodias
humbertodias / create-cert.sh
Last active February 26, 2018 15:17
Tomcat 9 configuration, with HTTP/2
# inside conf folder of tomcat9
cd $TOMCAT_HOME9/conf
# Common for the APR connector and conventional connectors
openssl req -newkey rsa:2048 -nodes -keyout tomcat.key -x509 -days 365 -out tomcat.crt
# Not useful for the APR connector
openssl pkcs12 -inkey tomcat.key -in tomcat.crt -export -out tomcat.pfx
@humbertodias
humbertodias / gist:97429ec6cfbfd2c71afba8b0bc5dcb64
Created March 2, 2018 16:47
Spotify No Ads in /etc/hosts
# Spotify NoAds
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 adeventtracker.spotify.com
127.0.0.1 ads-fa.spotify.com
127.0.0.1 analytics.spotify.com
127.0.0.1 audio2.spotify.com
127.0.0.1 b.scorecardresearch.com
127.0.0.1 bounceexchange.com
127.0.0.1 bs.serving-sys.com
127.0.0.1 content.bitsontherun.com