20260730

Microsoft Power Automate - Check Outlook Shared Calendar and Get your employee's leave status, and automatically send an email for the leave summary every day

 

When you want to know who is on leave today, and this automation is to collect the leave summary and send an email to you by every day morning






1. Get calendar (V2)


2. Compose Start

Inputs: formatDateTime(utcNow(),'yyyy-MM-ddT00:00:00Z')

20260714

Remote Desktop to Server - how to fix it (Encryption Oracle Remediation)

 

Via Group Policy (Recommended for Windows Pro/Enterprise)

This is the safest and most standard method.

  1. Press Win + R, type gpedit.msc, and press Enter to open the Local Group Policy Editor.

  2. Navigate to:
    Computer ConfigurationAdministrative TemplatesSystemCredentials Delegation

  3. In the right panel, find and double-click "Encryption Oracle Remediation".

  4. Select Enabled. Then, in the "Protection Level" dropdown below, choose Vulnerable.

  5. Click OK to save.

  6. Restart your computer (or run gpupdate /force in Command Prompt as Administrator).






20260308

RMAC 「沙田10K」河畔賽 2026

 

  1. 配速策略完美

  • 第1公里 4:45:你壓住了!這是整場比賽最關鍵的決定。沒有被腎上腺素帶快,為後程儲存了能量。

  • 第2-3公里 4:36→4:32:平穩過渡到目標區間,心率從158上升到171,完全可控。

  • 第4-6公里 4:38-4:35:在最艱難的中段,你穩住了節奏,心率維持在175-176。

  • 第7-9公里 4:41-4:39:這是意志力的考驗,你沒有崩掉,只是輕微掉速,然後迅速找回。

  • 第10公里 4:31完美的收官! 最後1公里提速,把所有剩餘能量用完。

  1. 心率證明一切

  • 平均心率170 bpm,最高184 bpm

  • 對跑者來說,這是在Zone 4-5邊緣的精準控制

  • 你沒有過早燒盡,也沒有留有餘力——完美配速

  1. 意志力的勝利

  • 第4公里心率已達176,但你堅持到了第10公里

  • 第7-8公里輕微掉速時,你沒有放棄,而是穩住

  • 最後1公里還能提速到4:31,證明你還有儲備


46分鐘

20260202

Using a vector index

 For example, imagine you have two documents with the following contents:


"The children played joyfully in the park."

"Kids happily ran around the playground."


These two documents contain texts that are semantically related, even though different words are used. By creating vector embeddings for the text in the documents, the relation between the words in the text can be mathematically calculated.


Imagine the keywords being extracted from the document and plotted as a vector in a multidimensional space:






The distance between vectors can be calculated by measuring the cosine of the angle between two vectors, also known as the cosine similarity. In other words, the cosine similarity computes the semantic similarity between documents and a query.

By representing words and their meanings with vectors, you can extract relevant context from your data source even when your data is stored in different formats (text or image) and languages.



20260119

2026年渣打馬拉松全馬破四回憶錄:熱勝紅日光

 

破四回憶錄:熱勝紅日光

<2026年1月18日>

凌晨4:00
鬧鐘響起時,窗外溫度顯示20度——比預期高太多。心頭一沉,想起去年14度的涼爽,知道今天將是場硬仗。匆匆吞下麵包早餐,檢查裝備:五包能量膠、鹽丸、還有賽前半小時前的一條能量Bar。



清晨5:15
抵達尖沙咀,全馬半馬各組別都齊集一起,處處是人海十分熱鬧。去年被編入一組的空間已成回憶,此刻前後左右都是跑者,空氣中瀰漫著悶熱與人聲。我擠到較前位置,在開跑前十分鐘吃下第一包藍色能量膠。

6:50 鳴槍起跑
人群緩慢移動,可能是二組關係大家配速不是特猛,我感覺自己配速5:15已是快車部隊之列。我耐心調整呼吸,告訴自己:「別急,後面還長。」

20260116

如何查找 Windows 10 /11的激活密匙 | 找回您的OEM 教字許可証密匙

 CMD

wmic path softwareLicensingService get OA3xOriginalProductKey

20251121

Authenticator 'Your Screen Lock has changed' Loop

Here's a much simpler solution.


Open the MS Authenticator app and click on your account.

Look for a menu item that says Re-enable Phone Sign-In and click it.

On the next screen, click the link to sign in with a password. Do NOT click the Send Notification button or you will experience the loop that the OP refers to.

20250802

FWD: 上層收拾下屬的十大權術

 1、卡脖之困

領導有資源分配權,可輕易為難下屬,不給予應有的支持,為其工作設置障礙。如此略施小計,便能讓下屬的工作舉步維艱。就如同演員上台,卻發現行頭不齊、設備故障,十分尷尬。
2、揪小辮子
抓住下屬的一點小錯誤,故意放大,借題發揮,上綱上線,然后借機處罰。下屬可能為了盡快過關、翻篇,而委曲求全,檢討、認罰,即便有的指責并不合理也忍了下來。然而,下屬越是退讓,領導越會對其進行心理打擊,增加精神壓力,直至其懷疑人生。

20250516

Protect the sytem with 4 dimensions (conditional access)

 https://learn.microsoft.com/en-us/entra/identity/conditional-access/plan-conditional-access




20250506

香港山路錦標賽(短距離) 試路分享

 比賽日5月25日,相信當天會比今日更加熱,比賽限時只有7小時,如果一心只用郊遊模式黎玩,鐵定超時!一小時最少都要行到5KM距離(12分PACE,包括上山),所以如果上山太慢,平路落山等等都要追返時間!

賽道頭20KM都係以古道石砌路為主,比較多凹凸不平,控制好其實都可以跑到,但絕對要小心坳柴。第一個大攀升位,起步由大美篤上山到春風亭至橫七古道,攀升340M,第二大攀升位,烏蛟騰經媽騰古道上到亞媽芴,攀升180M,呢兩段都算係多樹蔭,穩定住步伐就可以一口氣上到頂。小攀升位就仲有荔枝窩村上梅子林,攀升100M,全程水泥斜路。
第三大攀升位由20KM後開始,苗三石澗上環湖徑,1KM攀升200M,呢一段開始就變成少樹蔭,基本上可以講係暴曬路段,尤其比賽日起步時間8:30推算,到達呢一段既時間會係正午左右,今日我地2點半開始上山都感覺熱力難當,環湖徑之上仲有最少6個山頭上落,幾十攀升左右但全部都係急上急落。

總結:唔可以玩得太HEA,亦要帶夠水/補給飲品,天氣絕對係呢個比賽最大既敵人







20250416

OneDrive Usage Reports for a specific Department in Microsoft 365

 # Connect to SharePoint Online

Connect-SPOService -Url "https://xxxxxx-admin.sharepoint.com"


# Connect to Microsoft Graph (for department filtering)

Connect-MgGraph -Scopes "User.Read.All"


# Get all users where department contains "*"

$UsersInLangDept = Get-MgUser -All -Property Id, UserPrincipalName, Department | 

                   Where-Object { $_.Department -like "*XYZ*" }



# Get their OneDrive sites

$UsersInLangDept | ForEach-Object {

    # Convert UPN to correct URL format

    $OneDriveUrl = "https://xxxxx-my.sharepoint.com/personal/$($_.UserPrincipalName.Replace("@","_").Replace(".","_"))"



# Get OneDrive site (silently skip errors if no site exists)

    Get-SPOSite -Identity $OneDriveUrl -ErrorAction SilentlyContinue | 

    Select-Object Title, Owner, Department, StorageUsageCurrent

} | Export-Csv "D:\temp\OneDriveUsage_XYZ.csv" -NoTypeInformation


Write-Host "Exported to D:\temp\OneDriveUsage_XYZ.csv"

20250323

【秘密景點】 石澳道 水管路

 石澳道水管路概述


  1. 地點
    這條路線位於香港島南部的石澳附近。石澳是一個以美麗海灘、翠綠山景和悠閒氛圍聞名的地區。

  2. 水管路
    「水管路」是一條沿著輸水管道而行的隱秘行山路線。這些水管是香港供水系統的一部分,部分路段可供行山愛好者探索,成為一條獨特且具冒險性的路徑。


  3. 風景
    這條路線可能會提供壯麗的山景、海岸線景色,甚至可能遠眺南中國海。行山者可以同時享受自然風光和城市基礎設施的獨特結合。

  4. 難度
    水管路的難度很高 不建議新手或獨行者,有些路段可能平坦易行,而另一些路段則可能陡峭或崎嶇不平。建議穿著合適的行山鞋,並特別小心,尤其是靠近水管或施工區域的地方。

  5. 隱秘性
    這條路線被稱為「秘密景點」,因為它不像香港其他行山路線那樣廣為人知或正式標記。因此,它成為本地人和喜歡冒險的行山愛好者的熱門選擇。

  6. 交通
    起點通常位於石澳道附近,可以乘坐公共交通工具(例如從筲箕灣或其他港島地區出發的巴士)到達。


20250210

香港渣打馬拉松2025 全馬篇 - 破四之旅 (sub4)

 #sub4

#香港渣打馬拉松2025

#全馬破四系列

#不怕慢只怕停

#男兒當自強


(2024 全馬 : 03:59:59) 經過上年我的破四回憶錄,當日最懊惱的事情就是於最後一公里跑不動停下來而步行上馬師道天穚。這個經歷整整一年於我腦海之內揮之不去


2024年是充實的一年. 我於機緣之下7月至1月這半年之間我跟了一位出名教練去正式學習跑步。 


這半年的訓練強度甚有難度,但我不知不覺地跑快了半點, 連自己的心率都下調了. 


20241118

nginx security header - CSP


        # Add Security Headers

        add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

        add_header X-Content-Type-Options nosniff always;

        add_header X-Frame-Options "SAMEORIGIN" always;

        add_header X-XSS-Protection "1; mode=block" always;

        add_header Set-Cookie "Path=/; Secure; HttpOnly; SameSite=Lax" always;


add_header Referrer-Policy "no-referrer-when-downgrade" always;


add_header Permissions-Policy "geolocation=(self), microphone=()";


add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';";

        # end


PHP.ini

 expose_php = Off

20240523

【2024 最新方法】Win 11 (23H2 & 24H2) 免綁定微軟帳號!

 Shift + F10

oobe\bypassnro


現時,大部分玩家在安裝 Windows 11,若想跳過互聯網連接及 Microsoft 帳戶登陸,通常會使用 bypassnro.cmd 腳本。然而,當 Microsoft 封鎖此方法後,用戶其實仍可透過修改註冊表達成相同目的:
1. 在安裝過程中按下 Shift + F10,然後輸入 regedit 開啟註冊表編輯器。
2. 尋找 `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\OOBE`。
3. 將 **HideOnlineAccountScreens** 的值更改為 `1`。
此方法適用於 Windows 11 Home 及 Pro 版本。
根據 Microsoft 官方文件的解釋,HideOnlineAccountScreens主要用於企業的無人值守安裝,以跳過用戶登錄過程。因此,用戶可以將此技巧收藏以備不時之需。

 
Shift + F10
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE /v BypassNRO /t REG_DWORD /d 1 /f

shutdown /r /t 0



Standard preset security policy & Strict preset security policy

 


M365 Exchange online:


Connect-ExchangeOnline -UserPrincipalName <UPN> [-ExchangeEnvironmentName <Value>] [-ShowBanner:$false] [-DelegatedOrganization <String>] [-SkipLoadingFormatData]


# Connect-ExchangeOnline -UserPrincipalName xxx@xxx.onmicrosoft.com



View quarantine policies in PowerShell

# Get-QuarantinePolicy | Format-Table Name

# Get-QuarantinePolicy -QuarantinePolicyType GlobalQuarantinePolicy

# Get-QuarantinePolicy -QuarantinePolicyType QuarantinePolicy


# Get-QuarantinePolicy -Identity DefaultFullAccessPolicy

# Get-QuarantinePolicy -Identity AdminOnlyAccessPolicy

# Get-QuarantinePolicy -Identity DefaultFullAccessWithNotificationPolicy



<Standard preset security policy:>

# Write-Output -InputObject ("`r`n"*3),"Standard anti-malware policy",("-"*79);Get-MalwareFilterPolicy | Where-Object -Property RecommendedPolicyType -eq -Value "Standard"; Write-Output -InputObject ("`r`n"*3),"Standard anti-spam policy",("-"*79);Get-HostedContentFilterPolicy | Where-Object -Property RecommendedPolicyType -eq -Value "Standard"; Write-Output -InputObject ("`r`n"*3),"Standard anti-phishing policy",("-"*79);Get-AntiPhishPolicy | Where-Object -Property RecommendedPolicyType -eq -Value "Standard"



<Strict preset security policy:>

Write-Output -InputObject ("`r`n"*3),"Strict anti-malware policy",("-"*79);Get-MalwareFilterPolicy | Where-Object -Property RecommendedPolicyType -eq -Value "Strict"; Write-Output -InputObject ("`r`n"*3),"Strict anti-spam policy",("-"*79);Get-HostedContentFilterPolicy | Where-Object -Property RecommendedPolicyType -eq -Value "Strict"; Write-Output -InputObject ("`r`n"*3),"Strict anti-phishing policy",("-"*79);Get-AntiPhishPolicy | Where-Object -Property RecommendedPolicyType -eq -Value "Strict"


20240520

VMware Customer Connect portal for vSphere downloads - OEM Custom Images and Addons (After May 2024)

 new instruction after Broadcom (vmware custom download)


ESXi Downloads 

Full ISOs:

    1. Under the Products Tab, choose the user entitlement for VMware vSphere (e.g. click on VMware vSphere - Enterprise).
    2. Select the major version of vSphere required. 
    3. Click View Group on the right side of the VMware vSphere Hypervisor (ESXi) item. 
    4. Use the drop-down in the upper-right to choose the desired version. 

Patch Builds:

    1. Under the Solutions Tab, choose the user entitlement for VMware vSphere (e.g. click on VMware vSphere - Enterprise).
    2. Select the major version of vSphere required. 
    3. Find the desired version of ESXi in the list. 

Custom ISOs & OEM Addons:

    1. Under the Products Tab, choose the user entitlement for VMware vSphere (e.g. click on VMware vSphere - Enterprise).
    2. Select the major version of vSphere required.
    3. Select the Custom ISOs or OEM Addons tab.
    4. Click on the desired Custom ISO or Addon by OEM name and ESXi version.
    5. Download the desired deliverable and readme file for links to any OEM documentation. 
      • Accept the Broadcom EULA by marking the checkbox, if required. 
      • Address any legal, export/trade or other verification, as required. 

Notes:

      • All Custom ISO and OEM Content visible in any given tab for any given version of vSphere is identical and can be used on the given OEM server and ESXi version, e.g. the “Dell Custom Image for ESXi 8.0U2 Install CD” is the same download wherever it is seen.  Another way of stating this is that there is only one OEM Custom ISO and Addon download for any given OEM server and any given ESXi version, regardless of the various entitlements of vSphere.
      • You can also find the Custom ISOs and OEM Addons tabs from the VMware vSphere Hypervisor (ESXi) group under VMware vSphere - Enterprise. Here, you can filter the release specific Custom ISO or addon.
        1. Click on View Group against vSphere Hypervisor (ESXi). 
        2. Select the desired ESXi release from the drop down under the Primary Downloads tab.
        3. Go to Custom ISOs or OEM Addons tab.
        4. Click on the desired Custom ISO or Addon by OEM name or ESXi version. 
        5. Download the desired deliverable and readme file for links to any OEM documentation.
          • Accept the Broadcom EULA by marking the checkbox, if required. 
Related Posts Plugin for WordPress, Blogger...