How to append to a json file python - the quick way import json your_dictionary = {'a_new_key': 'a_new_value'} with open('a_json.json') as a_file: data = json.load(a_file) data.update(your_dictionary) with open('a_json.json', 'w') as f: json.dump(data, f)
How to setup Mailhog mail server on Ubuntu install Go (since mailhog is written in Go) sudo apt-get install golang-go mkdir gocode echo "export GOPATH=$HOME/gocode" >> ~/.profile source ~/.profile install mailhog go get github.com/mailhog/MailHog go get github.com/mailhog/mhsendmail make binaries global - replace USERNAME with your OS username sudo cp /home/USERNAME/gocode/bin/MailHog /usr/local/bin/mailhog sudo cp /home/USERNAME/gocode/bin/mhsendmail /usr/local/bin/mhsendmail install PHP sudo apt install php7.2-cli edit php.ini
Comments
Post a Comment