2020/10/07

解決本機的 DynamoDB 寫入權限問題

## docker-compose.yml ``` version: "3" volumes: dynamodb-data: external: true services: dynamodb-local: image: amazon/dynamodb-local ports: - "8000:8000" command: ["-jar", "DynamoDBLocal.jar", "-sharedDb", "-dbPath", "./data"] volumes: - dynamodb-data:/home/dynamodblocal/data ``` ## use docker-compose ``` docker-compose up -d ``` ## login your docker container ``` docker exec -u root -t -i /bin/bash ``` ## change your docker container database file permission ``` chmod a+rw /home/dynamodblocal/data ``` refer: https://stackoverflow.com/questions/41221532/docker-volume-need-permissions-to-write-to-database

2020/06/15

用 PowerShell 找出 Windows Task Schedule 裡超過時間的排程

``` Get-ScheduledTask | ? State -eq Running | Get-ScheduledTaskInfo | % { $lastRunTime = [datetime]::parse($_.LastRunTime) $lastRunTime $ts = New-TimeSpan -Start $lastRunTime -End (Get-Date) $ts.Minutes if ($ts.Minutes -gt 10) { Write-Host $_.TaskName Write-Host "Running over 10 minutes!!" } } ```

軟體工程的重要的指標