Skip to content

Instantly share code, notes, and snippets.

View alantsai's full-sized avatar

Alan Tsai alantsai

View GitHub Profile
@alantsai
alantsai / ReadMe.md
Created February 1, 2017 16:10
use powershell to sort file by using natural number #powershell

有時候檔案名稱裡面會有數字,但是排序的時候因為是用字串排序,所以順序不如預期。 例如說有以下幾個檔案:

a1
a2
a10
a20

預期的排序應該如上,但是實際上排序出來會類似:

@alantsai
alantsai / delete-large-data-without-tracation-log-grow-without-space.md
Last active February 3, 2018 04:37
delete large data without transaction log full with no space

When delete large data showed

The transaction log for database '{db name}' is full due to 'ACTIVE_TRANSACTION'.

which means there is no more space for log

if you don't have that much space for large delete, do it in chunks

more info checkout

@alantsai
alantsai / remove-bin-and-obj-folder.ps1
Last active February 12, 2018 07:49
[Remove packages, bin and obj folder 刪除 packages,bin和obj資料夾] 用來快速清理solution裡面非必要檔案減少空間 #powershell
# 看看那些會刪掉
dir -Directory -Recurse -Include bin,obj | %{$_.FullName}
# 實際刪掉
dir -Directory -Recurse -Include bin,obj | Remove-Item -Force -Recurse
@alantsai
alantsai / ReadMe.md
Last active June 1, 2019 03:45
20190601-分享DevOps以及Azure DevOps的Pipeline功能做到CI以及CD
@alantsai
alantsai / 01-readme.md
Last active June 1, 2020 09:58
[disable sql constraints (foregin key)] how to disable all sql contraints or goregin key - use for import data #sql