Skip to content

Instantly share code, notes, and snippets.

View viewplatgh's full-sized avatar
😌
Relaxing

Rob Lao viewplatgh

😌
Relaxing
View GitHub Profile
@viewplatgh
viewplatgh / vagrantuplaravelhomesteaddebugouput.log
Last active May 6, 2023 18:40
vagrant up laravel/homestead failed with error: address family must be specified (IPAddr::AddressFamilyError)
INFO global: Vagrant version: 2.3.4
INFO global: Ruby version: 2.7.6
INFO global: RubyGems version: 3.1.6
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/bin/vagrant"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/plugins/synced_folders/nfs/plugin.rb
@viewplatgh
viewplatgh / rsa_sha256_signed_verify.py
Created August 28, 2020 12:25
Use rsa sha256 public key to verify signed text in Python
# packages required but not limited to:
# asn1crypto==0.24.0
# cryptography==2.2.2
# pyOpenSSL==17.5.0
import crypto
# Use the public key file: 'pub_key_filename' to verify
# if 'signed' is a valid one from 'plain_text'
# if it's valid return True, otherwise return False
def verify_signed_text(pub_key_filename, plain_text, signed):