dotnet new sln -n SolutionName
dotnet new webapi -n Todo.API
| CREATE TABLE accounts ( | |
| account_id SERIAL PRIMARY KEY, | |
| account_name VARCHAR(100) NOT NULL, | |
| account_type VARCHAR(20) NOT NULL -- 'Asset', 'Liability', 'Equity', 'Income', 'Expense' | |
| ); | |
| CREATE TABLE transactions ( | |
| transaction_id SERIAL PRIMARY KEY, | |
| account_id INTEGER REFERENCES accounts(account_id), | |
| transaction_date DATE NOT NULL DEFAULT CURRENT_DATE, |
| import React, { useEffect, useState } from 'react' | |
| import { | |
| APIProvider, | |
| Map, | |
| AdvancedMarker, | |
| Pin, | |
| InfoWindow, | |
| MapMouseEvent, | |
| useMap, | |
| useMapsLibrary, |
| # generate a private key with the correct length | |
| openssl genrsa -out private-key.pem 3072 | |
| # generate corresponding public key | |
| openssl rsa -in private-key.pem -pubout -out public-key.pem | |
| # optional: create a self-signed certificate | |
| openssl req -new -x509 -key private-key.pem -out cert.pem -days 360 | |
| # optional: convert pem to pfx |
| # -c = Number of concurrent request | |
| # -n = Total Number of Request | |
| # -p = Post Request | |
| # for get request | |
| ab -c 10 -n 500 https://127.0.0.1:5060/faceapi/encodings | |
| # for post request | |
| ab -p body_encodings.json -T application/json -c 10 -n 500 -l http://127.0.0.1:5060/faceapi/encodings |
| ### Search All Indices | |
| GET _search | |
| { | |
| "query": { | |
| "match_all": {} | |
| } | |
| } | |
| ### Cluster Health check | |
| GET /_cluster/health |
| # Create a linux user | |
| > sudo adduser <name> --home /home/<name> | |
| > sudo usermod -aG sudo <username> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| *** Keep feature branch up to date with main *** | |
| //in feature branch | |
| git fetch | |
| git rebase origin/main | |
| // if conflict arise and resolved manually | |
| git rebase --continue | |
| git push --force |
| # for cuda memory allocation error | |
| # add this line so that memory can grow by tf | |
| # face_service.py | |
| from tensorflow as tf | |
| physical_devices = tf.config.experimental.list_physical_devices('GPU') | |
| tf.config.experimental.set_memory_growth(physical_devices[0], True) |