-
Make sure your cpu support
kvmwith below command:grep -E "(vmx|svm)" --color=always /proc/cpuinfo -
Make sure BIOS have enable “Virtualization Technology”.
-
User access to
/dev/kvmso add your account into kvm(78) group:
| # install docker in Debian 11/WSL2 | |
| # uses systemd-genie since docker requires systemd but it's not available for WSL | |
| # this is an alternative to Docker Desktop | |
| # prerequisites | |
| sudo apt-get update | |
| sudo apt-get dist-upgrade | |
| sudo apt-get install ca-certificates curl wget gnupg lsb-release apt-transport-https | |
| # systemd-genie requires dotnet runtime, add Microsoft repo |
| #!/bin/bash | |
| #Federico Ponzi | |
| #doylefermi | |
| #chocolatkey | |
| # GPLv2 | |
| usage() | |
| { | |
| echo "Usage: $0 [-all][-list][-i] xxx.xxx.xxx.xxx" | |
| } |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the\commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.
If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.
I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| # Question - how best to handle model fields that are excluded from a form's | |
| # fields. | |
| # ------------------------------------------------------------ | |
| # Option 1: assign fields to instance before passing into form | |
| # ------------------------------------------------------------ | |
| # views.py | |
| instance = Vote(review=review, user=request.user) | |
| form = VoteForm(data=request.POST, instance=instance) |