This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name mydomain.com www.mydomain.com; | |
| location / { | |
| rewrite ^(.*)$ https://$server_name$1 permanent; | |
| } | |
| } |
This file contains hidden or 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
| const fs = require('fs') | |
| class Cart{ | |
| constructor(file='./cart.txt'){ | |
| this.file = file | |
| this.tempCart = [] | |
| } | |
| addItem(items){ | |
| items.quantity ? items.quantity : items['quantity']=1 |
This file contains hidden or 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
| 1.Update item price with SKU AROG-001 to 14000000. | |
| UPDATE items SET price = 14000000 WHERE sku = 'AROG-001'; | |
| 2.Find all users who have never logged in. | |
| SELECT * FROM users WHERE created_at = updated_at; | |
| 3.Find all items that contains "mac". | |
| mysql> SELECT * FROM items WHERE name LIKE '%Mac%'; | |
| 4.Count all paid orders with SKU IPHX-001. |