电子芥末
超简单易用的 Java Web 框架 - Javalin
我习惯用 Go 来做一些小网站,最近想换个口味,试试 Java. 我以前嫌弃 Java 太啰嗦,但自从尝试在 Python 里严格认真地使用 type hint, 累死我了,这比 Java 更啰嗦。这样折腾过后, Java 在我眼中也眉清目秀起来。
以前虽然学过 Java, 但几乎没有真正用过,并且已经多年完全没写过 Java, 因此需要重新学习,就看了一遍 dev.java
由于我主要是想做些自用的小工具,就没必要学 Spring 了,找个更…
Mark24
代码会说话之一个脚本帮你检查项目 996 状态
马上要进新组了,一看他们的仓库眼泪留下来
项目地址 Mark24Code/check_996
Check 996
帮助你检查项目 996 状态. 😎
Usage: check_996.rb [options]
-s, --start WORK_START_TIME start job time e.g. 10:00:00
-e, --end WORK_END_TIME end job time e.g. 18:00:00
-g, --git-log GIT_LOG_CMD use git log command, default is `git log --all`
-f, --filter FILTER time range filter e.g. last_[day|week|month|year] last_5_[day|week|month|year] '2022-01-01 08:10:00,2022-10-01 08:10:00'
-v, --version…
busylog
add Windows Firewall Rules to Block UWP Applications
to create the firewall rule, you need to get the package SID.
the normal method is DeriveAppContainerSidFromAppContainerName.
but thankfully there's an alternate implementation from https://github.com/metablaster/WindowsFirewallRuleset/issues/6 that could convert PackageFamilyName to SID, and I ported the method to python3.
New-NetFirewallRule -Displayname RULENAME -enabled false -action block -direction out -package SID
# Get-AppxPackage|select Name,PackageFamilyName
import hashlib
# s is PackageFamilyName
def AppSid(s):
# unicode without bom
a = hashlib.sha256(s.lower().encode('utf16')[2:]).digest()
r = []
for i in range(0,28,4): # not 32, last part not needed
r.append(int…