-
Design Patterns. Elements of Reusable Object-Oriented Software. by Erich Gamma https://smile.amazon.de/-/en/gp/product/0201633612/ref=ox_sc_act_title_1?smid=A3JWKAKR8XB7XF&psc=1
-
Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric J. Evans https://smile.amazon.de/-/en/gp/product/0321125215/ref=ox_sc_act_title_2?smid=A3JWKAKR8XB7XF&psc=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
// reference: https://community.trading212.com/t/t212-contract-note-email-importer/15954/28 | |
const config = { | |
sheetName: 'Transactions', | |
label: 'Trading212/Contract-Statements', | |
mapTransactions: true, | |
}; | |
const headerRow = [ | |
'Instrument', |
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
Git Reflog | |
https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog | |
https://git-scm.com/docs/git-reflog | |
```bash | |
git reflog show HEAD | |
git reset --hard HEAD@{x} |
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
pg_dump -h {HOST} -U {USER} -W --verbose -Fc --no-acl {DB_NAME} > ./{FILE_NAME}.psql | |
pg_restore -h {HOST} -U {USER} -W --exit-on-error --verbose --no-acl --dbname={DB_NAME} < ./{FILE_NAME} |
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
#!/usr/bin/env zsh | |
local PARTITION_KEY='hashKey' | |
local SORT_KEY='sortKey' | |
local TABLE_NAME='table' | |
aws dynamodb scan \ | |
--attributes-to-get $PARTITION_KEY $SORT_KEY \ | |
--table-name $TABLE_NAME --query "Items[*]" | | |
jq --compact-output '.[]' | |
There's a workaround for filtering based on relation fields for findOne()
/find()
methods that I've discovered recently. The problem with filtering related table fields only exists for ObjectLiteral
-style where
, while string conditions work perfectly.
Assume that we have two entities – User
and Role
, user belongs to one role, role has many users:
@Entity()
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "test Program", | |
"port": 5858, | |
"program": "${workspaceRoot}/index.js", | |
"env": { |