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!!" } } ```

2019/09/04

T-SQL 語法風格

在討論 coding style 時, 有提到 T-SQL 是否也有語法風格規範? 找了幾個網路的文章, 在此列表做為記錄, 因為目前主要是使用微軟的 MSSQL, 自然也要附上 MSDN 的文章做為參考。 - [Transact-SQL 語法慣例 (Transact-SQL)](https://docs.microsoft.com/zh-tw/sql/t-sql/language-elements/transact-sql-syntax-conventions-transact-sql?view=sql-server-2017) - [SQL樣式指南 · SQL Style Guide](https://www.sqlstyle.guide/zh-tw/)

2019/03/11

Command line recycle IIS Application Pool

## Use appcmd ### List application pool (find the apppool name) ``` C:\Windows\System32\inetsrv\appcmd.exe list apppool ==== the result ==== APPPOOL "DefaultAppPool" (MgdVersion:v4.0,MgdMode:Integrated,state:Started) APPPOOL "Classic .NET AppPool" (MgdVersion:v2.0,MgdMode:Classic,state:Started) APPPOOL ".NET v2.0 Classic" (MgdVersion:v2.0,MgdMode:Classic,state:Started) APPPOOL ".NET v2.0" (MgdVersion:v2.0,MgdMode:Integrated,state:Started) APPPOOL ".NET v4.5 Classic" (MgdVersion:v4.0,MgdMode:Classic,state:Started) APPPOOL ".NET v4.5" (MgdVersion:v4.0,MgdMode:Integrated,state:Started) ``` ### Recycle the application pool ``` C:\Windows\System32\inetsrv\appcmd.exe recycle apppool ".NET v2.0 Classic" ==== the result ==== ".NET v2.0 Classic" successfully recycled ```

2019/03/04

幾個可以幫助新創業務的線上服務

內容取自 Producthunt

===============================
"What's a tool that changed your life?" - us to freelancers on Twitter yesterday.

Why we think this is an important question: freelancing often means unchartered territory. When you work for yourself, it's up to you to find clients, lead projects, manage payments, find insurance, get dressed every day, etc. But freelancing as a career option is on the rise — reports predict that a majority of the U.S. workforce will be freelance by 2027.

Want that life? Here are some of the apps that freelancers are currently using:

Freshbooks for getting paid

Slack for communication

Notion for an all-in-one workspace

Webflow for web design

Qlearly as a tabs manager

Nuzzel for news monitoring

Unsplash for images

Things for managing tasks

Pastel for feedback and questions

1Password for security

AND CO for invoicing, expenses and proposals


Sent from Mail for Windows 10

2019/01/30

90% 症候群

在進行大規模盤點專案時, 有人跟我說 "敏捷不能解這題" "你要用 water fall" "你要列出總進度, 目前進度"

但最終結果都落入了90% 症候群, 沒有完全的結束

 

要記住的是:

  • 把工作拆小
  • 工作只有二種狀態: "完成" "尚未開始"
  • 不要問 "這個工作的進度到那了?" 而是問 "我們完成這個功能了嗎?"

 

https://www.mountaingoatsoftware.com/blog/why-agile-teams-put-so-much-emphasis-on-being-done-each-iteration?utm_source=drip&utm_medium=email&utm_campaign=Why+Agile+Teams+Put+So+Much+Emphasis+on+Being+Done+Each+Iteration

 

 

Sent from Mail for Windows 10

 

2018/12/07

常用 Git Command

### Initialization ``` git clone git@bitbucket.org:jessewth/xxxxx.deployment.git git flow init -f -d git remote add upstream git@bitbucket.org:xxxxxi/nineyi.deployment.git ``` ### Remove remote branch ``` git push origin --delete feature/develop_release feature/master_for_release ``` ### Clean branch cache ``` git remote prune origin git fetch --prune ``` reference: [Git: Remove information on branches that were deleted on origin](https://makandracards.com/makandra/6739-git-remove-information-on-branches-that-were-deleted-on-origin) ### Git tag https://git-scm.com/book/en/v2/Git-Basics-Tagging ### 還原到未修改前的狀態 ``` git reset --hard ``` ### 還原到未修改前的狀態及刪除未 commit 的新檔 ``` git clean -fd ``` ##3 用 command line 看 git log ``` git log --oneline --decorate --all --graph ``` 為了方便使用, 把上述 command 加入 alias, 命名為 git tree, 下次要用的時候, 直接打 git tree 即可 ``` git config --global alias.tree "log --oneline --decorate --all --graph" ``` ### 回復單一個檔案的變更 ``` git checkout HEAD -- ../../ConnectionStrings.config ``` ### Git log search keyword ``` git log -g --grep="vsts28270" ```