-
Authentication: User can signup/login/logout
-
Items for sale: User can view lists of items for sale and search by name, filter by price.
-
Shopping Cart: User can add items to shopping cart and the app remembers it next time you login. User can view all the items in their shopping cart. User can delete items in the shopping cart. Shopping cart uses an integer column to store "state".
-
Checkout: User can fill in form and submit billing info. After submitting billing info, items in the shopping cart will move to a different "state".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew update && brew install azure-cli | |
# create azure account | |
# create azure directory | |
# can create user in that directory | |
# create subscription in that directory | |
az login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ubuntu 16.04 (default Python 3.5), not Ubuntu => go install | |
sudo apt-get install software-properties-common | |
sudo apt-add-repository universe | |
sudo apt-get update | |
sudo apt-get install python-pip python3-dev python3-venv | |
# Environnements folders | |
mkdir venvs | |
# Specify the system python3 installation | |
python3 -m venv venvs/flaskproj | |
# Activate the virtualenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install psycopg2 | |
sudo apt-get install postgresql postgresql-contrib | |
sudo apt-get install python-psycopg2 | |
sudo apt-get install libpq-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you get following error, when you try to start nginx… | |
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) | |
Then it means nginx or some other process is already using port 80. | |
You can kill it using: | |
sudo fuser -k 80/tcp |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#image of /dev/sd5 in sd5.img | |
sudo dd if=/dev/sda5 of=/home/sda5.img | |
#install grub in sdb | |
grub-install /dev/sdb | |
update-grub | |
#make a disk bootable | |
sudo umount /dev/sdX | |
sudo dd if=/path/to/ubuntu.iso of=/dev/sdX bs=4M && sync | |
#set a partition to boot | |
parted -s /dev/sda set 2 boot on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following is the best way to completely uninstall node + npm: | |
go to /usr/local/lib and delete any node and node_modules | |
go to /usr/local/include and delete any node and node_modules directory | |
if you installed with brew install node, then run brew uninstall node in your terminal | |
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there | |
go to /usr/local/bin and delete any node executable | |
You may need to do the additional instructions as well: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Trying to use Windows 7 USB/DVD Download Tool, to create a bootable USB in order to install Windows from USB. | |
Problem: "Sorry, we are unable to copy your files .... (blablabla)" | |
Solution: Type these commands on the cmd | |
diskpart | |
list disk | |
select disk # | |
clean | |
create partition primary | |
select partition 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Symfony 2 error: | |
====================== | |
[Symfony\Component\Debug\Exception\ContextErrorException] | |
Warning: date_default_timezone_get(): It is not safe to rely on the system | |
's timezone settings. You are *required* to use the date.timezone setting | |
or the date_default_timezone_set() function. In case you used any of those | |
methods and you are still getting this warning, you most likely misspelle | |
d the timezone identifier. We selected the timezone 'UTC' for now, but ple | |
ase set date.timezone to select your timezone. in /Users/amonmoce/Document | |
s/Web/www/ZakafricaProject/vendor/monolog/monolog/src/Monolog/Logger.php l |
NewerOlder