Searching txt.sour.is

Twts matching #reading
Sort by: Newest, Oldest, Most Relevant

golang 每日一庫之 redsync
redsync 是一個用 Go 編寫的分佈式互斥鎖(Distributed Mutex)庫,基於 Redis 實現。其主要目標是在分佈式系統中爲多個進程或服務之間提供互斥訪問的機制,確保同一時間內只有一個客戶端可以訪問共享資源。核心功能—-redsync 實現了 Redlock 算法(由 Redis 創始人 antirez 提出),該算法旨在在分佈式環境中實現安全、健壯的鎖。基本原理使用多個獨 ⌘ Read more

⤋ Read More

golang 每日一庫之 redsync
redsync 是一個用 Go 編寫的分佈式互斥鎖(Distributed Mutex)庫,基於 Redis 實現。其主要目標是在分佈式系統中爲多個進程或服務之間提供互斥訪問的機制,確保同一時間內只有一個客戶端可以訪問共享資源。核心功能—-redsync 實現了 Redlock 算法(由 Redis 創始人 antirez 提出),該算法旨在在分佈式環境中實現安全、健壯的鎖。基本原理使用多個獨 ⌘ Read more

⤋ Read More

golang gin 基於 Casbin 實現權限控制
最近在使用 golang gin 開發一套公司內部的人事管理系統,但是發現權限管理比之前搞的系統要複雜不少, 所以我想借機瞭解一下傳說中的 Casbin 權限控制庫,看看是否可以借鑑一下。涉及權限控制的需求場景———–人事部門負責人需要能看到所有的人事數據 人事部門的普通 HR,只能看到部分部門的人事數據。即只能看到自己負責的部門數據 IT 部門或者行政部門指定人員,能看 ⌘ Read more

⤋ Read More

golang gin 基於 Casbin 實現權限控制
最近在使用 golang gin 開發一套公司內部的人事管理系統,但是發現權限管理比之前搞的系統要複雜不少, 所以我想借機瞭解一下傳說中的 Casbin 權限控制庫,看看是否可以借鑑一下。涉及權限控制的需求場景———–人事部門負責人需要能看到所有的人事數據 人事部門的普通 HR,只能看到部分部門的人事數據。即只能看到自己負責的部門數據 IT 部門或者行政部門指定人員,能看 ⌘ Read more

⤋ Read More

MarkItDown MCP:一鍵轉換 pdf-word-ppt-html 等文檔爲 MarkDown 格式
簡單介紹---- markitdown-mcp 包提供了一個輕量級的 STDIO 和 SSE MCP 服務器,用於調用 MarkItDown。 它公開了一個工具: converttomarkdown(uri) ,其中 uri 可以是任何 http: 、 https: 、 file: 或 data: URI 。Installation 安裝—————如遇到安裝失敗的問題, ⌘ Read more

⤋ Read More

費時一個多月終於使用 Session 實現了二維碼掃碼登錄功能
我終於完成了二維碼掃碼登錄功能,這個功能開發斷斷續續的用了我一個多月的空閒時間,其中 cookie 回寫和 session 同步就佔了 20 多天,開發有多痛苦,完成後就有多喜悅,。二維碼掃碼登錄是一種常見的無密碼認證方式,它的實現原理非常簡單:第一步在服務器生成一個唯一二維碼 ID 和對應的隨機 token,返回給 Web 網頁並生成二維碼,第二步用戶使用手機 APP 掃描二維碼,然後將用戶信息 ⌘ Read more

⤋ Read More

Ollama-OCR:基於 Ollama 多模態大模型的端到端文檔解析和處理
基本介紹Ollama-OCR 是一個 Python 的 OCR 解析庫,結合了 Ollama 的模型能力,可以直接處理 PDF 文件無需額外轉換,輕鬆從掃描版或原生 PDF 文檔中提取文本和數據。根據使用的視覺模型和自定義提示詞,Ollama-OCR 可支持多種語言,並且能把文檔轉換爲特定的格式進行輸出。支持多種視覺模型———–可以從 Ollama 上選擇最新的視覺模型: ● gem ⌘ Read more

⤋ Read More

Armbian 25.5 Adds New Board Support, Application Modules, and Receives Community Recognition
The Armbian team has released version 25.5, bringing expanded hardware compatibility, improved system tools, and a growing library of post-install application modules. The update also coincides with Armbian being recognized by NetBox Labs with a 2025 NetBox Hero Award for its role in open infrastructure innovation. New in Armbian v25.5 The latest release include … ⌘ Read more

⤋ Read More

DietPi May 2025 Update Introduces Security Changes, Kernel Fixes, and Software Cleanups
The latest DietPi release (v9.13) focuses on improving security defaults, enhancing support for specific SBCs, and removing outdated software options. The update also brings kernel upgrades, interface refinements, and dozens of bug fixes for improved stability across platforms. DietPi: DietPi is a lightweight, Debian-based operating system optimized for single-board compu … ⌘ Read more

⤋ Read More

[$] Development statistics for the 6.15 kernel
The 6.14 kernel development cycle only brought in 11,003 non-merge
changesets, making it the slowest cycle since 4.0, which was released in
2015. The 6.15 kernel, instead, brought in 14,612 changesets, making it
the busiest release since 6.7, released at the beginning of 2024. The
kernel development process, in other words, is back up to full speed. The
6.15\
release happened on May 25, so the … ⌘ Read more

⤋ Read More

Security updates for Monday
Security updates have been issued by AlmaLinux (389-ds-base, ghostscript, grafana, kernel, and osbuild-composer), Debian (intel-microcode, kernel, libphp-adodb, and openssl), Fedora (dotnet8.0, ghostscript, iputils, nbdkit, open-vm-tools, thunderbird, and vyper), Mageia (chromium-browser-stable, glibc, iputils, microcode, nodejs, and zsync), Oracle (.NET 8.0, .NET 9.0, 389-ds-base, avahi, buildah, compat-openssl11, expat, firefox, ghostscript, gimp, git, grafana, gvisor-tap-vsock, libso … ⌘ Read more

⤋ Read More

Apple Raises iCloud+ Prices in Three Countries
Apple recently raised prices for its iCloud+ plans in Brazil, Chile, and Peru, according to a support document updated last Thursday.

Image

The table below outlines the price changes in each country.

CountryOld PricesNew PricesBrazil50GB: R$ 4.90

200GB: R$ 14.90

2TB: R$ 49.90

6TB: R$ 149.90

12TB: R$ 299.90
… ⌘ Read more

⤋ Read More

Workers at top US consumer watchdog sound warning as Trump bids to gut agency
Michael Sainato,    -  The Guardian (U.K.)

_Stephan: The fascist Trumpian coup continues, and one of its main goals, to turn Americans into powerless peasants, escalates. One of its strategies, as this article in the British newspaper The Guardian describes, is that you and I will no longer have any place to turn if we are cheated or ripped off by a corporation. A bipart … ⌘ Read more

⤋ Read More

President Trump’s approval rating: Here’s what latest opinion polls show
Kathryn Palmer,   Trending News Reporter  -  USA Today

_Stephan: The truth that corporate media doesn’t seem able or willing to touch is that the transformation of the United States into a fascist autocracy by Trump and his vellains is only happening because a small majority of Americans voted for it. Fascism never comes into power through violence; it is always voted into office by … ⌘ Read more

⤋ Read More

Welcome To The White Christian Nationalist Presidency
David Kurtz,  Editor-at-Large  -  TPM

_Stephan: In the United States, a strange affiliation has arisen amongst evangelical Christianity, White racism, and fascism. This is the core partnership of MAGAt world, and a historic distortion of Jesus’ teachings. These are the people who voted Trump into office, whose wellbeing will be most severely damaged.  Yet, they still support and kneel to Donald Trump. He, in turn, art … ⌘ Read more

⤋ Read More

Rule change would allow Trump to ‘cook the books’ and hide collapsing economy: report
Tom Boggioni,  Senior Editor  -  Raw Story

_Stephan: Fascist governance is always inferior to democratic governance. Can you think of a single fascist ruled nation in history that was world leader in social wellbeing, education, science, or medicine? No, neither can I because there is no such example One of the hallmarks of fascists is that they never want t … ⌘ Read more

⤋ Read More

支付寶證書原理和使用 Golang 集成
支付寶證書驗證機制是保障交易安全的核心環節,主要是基於 PKI(公鑰基礎設施)體系構建。其驗證流程包含以下幾個關鍵部分:1,證書體系支付寶使用兩套證書,應用證書和支付寶根證書。應用證書由開發者上傳到支付寶開放平臺,支付寶根證書用於驗證支付寶返回數據的真實性。2,簽名驗證流程請求時,開發者使用私鑰對請求參數簽名,支付寶使用應用公鑰驗證。響應時,支付寶使用私鑰對返回數據簽名,開發者使用支付寶公鑰驗證。 ⌘ Read more

⤋ Read More

支付寶證書原理和使用 Golang 集成
支付寶證書驗證機制是保障交易安全的核心環節,主要是基於 PKI(公鑰基礎設施)體系構建。其驗證流程包含以下幾個關鍵部分:1,證書體系支付寶使用兩套證書,應用證書和支付寶根證書。應用證書由開發者上傳到支付寶開放平臺,支付寶根證書用於驗證支付寶返回數據的真實性。2,簽名驗證流程請求時,開發者使用私鑰對請求參數簽名,支付寶使用應用公鑰驗證。響應時,支付寶使用私鑰對返回數據簽名,開發者使用支付寶公鑰驗證。 ⌘ Read more

⤋ Read More

內網穿透系列四:基於 SSH 隧道技術實現的內網穿透工具 Serveo
一、簡介—-• Serveo 是一個免費的 SSH 隧道服務,允許用戶將本地服務器暴露到互聯網上 • 幾乎無需安裝任何軟件,也無需複雜配置,只需通過 SSH 連接即可實現端口轉發 • 支持所有基於 TCP 的通信協議,包括:SSH/HTTP/HTTPS 等等 • 官網地址參考:https://serveo.net/,工作原理示意圖如下 二、安裝準備—– ⌘ Read more

⤋ Read More

一文掌握常見的限流算法:計數器、漏桶、令牌桶等
限流(Rate Limiting),也稱流量控制。是指系統在面臨高併發,或者大流量請求的情況下,限制新的請求對系統的訪問,從而保證系統的穩定性。限流會導致部分用戶請求處理不及時或者被拒,這就影響了用戶體驗。所以一般需要在系統穩定和用戶體驗之間平衡一下。常見的限流算法包括固定窗口計數器算法、滑動窗口計數器算法、漏桶算法、令牌桶算法、基於用戶的限流和動態限流。其中固定窗口計數器算法、滑動窗口計數器算法 ⌘ Read more

⤋ Read More

微服務架構:必懂的 5 種設計模式
1. Database per Service (每個服務一個數據庫)目標 / 目的實現微服務之間的松耦合。 增強服務的獨立性、可伸縮性和數據封裝。 關鍵概念 / 工作方式每個微服務管理自己的私有數據庫。 數據庫只能由擁有該服務的服務訪問。 強制執行清晰的邊界並促進單一職責原則。 數據隔離 減少服務之間的依賴。 技術靈活性 服務可以使 ⌘ Read more

⤋ Read More

Golang 接口加鎖與數據庫事務的重要性:從紅包漏洞看系統安全
在分佈式系統和高併發場景中,接口加鎖和數據庫事務處理是保障數據一致性和系統安全的關鍵機制。本文將通過一個真實的紅包系統漏洞案例,探討 Golang 中接口加鎖的實現方式、數據庫事務的正確使用方法,以及忽視這些機制可能帶來的嚴重後果。一、Golang 接口加鎖機制爲什麼需要接口加鎖?在高併發場景下,多個請求可能同時訪問通過一個資源(如用戶賬戶餘額),如果沒有適當的鎖機制,會導致競態條件,造成數據不一 ⌘ Read more

⤋ Read More