Searching We.Love.Privacy.Club

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

(#f26jg3a) @kat Haha 🤣 If someone figures this out, please let me know 🙏🙏 – In the meantime, I’m going to very soon™ write a daemon …
@kat @yarn.girlonthemoon.xyz Haha 🤣 If someone figures this out, please let me know 🙏🙏 – In the meantime, I’m going to very soon™ write a daemon that will watch the audit log for repeated violations and add to the network firewall. ⌘ Read more

⤋ Read More

**How in da fuq do you actually make these fucking useless AI bots go way?

proxy-1:~# jq '. | select(.request.remote_ip=="4.227.36.76")' /v ...**
How in da fuq do you _actually_ make these fucking useless AI bots go way?

proxy-1:~# jq ‘. | select(.request.remote_ip==“4.227.36.76”)’ /var/log/caddy/access/mills.io.log | jq -s ‘. | last’ | caddy-log-formatter -
4.227.36.76 - [2025-01-05 04:05:43.971 +0000] “GET /external?aff-QNAXWV=&f=mediaonly&f=noreplies&nick=g1n&uri=https%3A%2F%2Fmy-hero-ultra-impact-codes.linegames.org HTTP/2.0” … ⌘ Read more

⤋ Read More
In-reply-to » need to come up with ideas for camcorder videos... i have one but it's just 'talk in front of camera about fave songs i listened to in 2024' and i wanna do more fun things even though rambling in front of cam is already fun af

@bender@twtxt.net aw thank you so much!!! rambling is the best… just gotta keep on going about what we love and somehow people like it lol!

⤋ Read More

使用 Go 構建基於時間的一次性密碼 -TOTP- 生成器
前言–現在很多網站都開啓了 2FA(Two-Factor Authentication,雙因素認證),如 GitHub、Google、微軟等。這種額外的安全層顯著提高了賬戶的安全性。本文將深入探討如何使用 Go 語言實現 TOTP 生成器,並詳細解釋其工作原理和安全考慮原理解析—-兩步驗證要求用戶提供兩種不同形式的身份驗證:知識因素:用戶知道的信息(如密碼) 所有權因素:用戶擁有的設 ⌘ Read more

⤋ Read More

Go Gin 源碼分析:上下文複用與 Goroutine 中的潛在坑
前言如果你看過Go 語言中Gin 框架的官方文檔,你可能會注意到一條重要的提醒:當在中間件或 handler 中啓動新的 Goroutine 時,不能使用原始的上下文,必須使用只讀副本。文檔中還提供了以下示例代碼:func main() { r := gin.Default() r.GET(“/longasync”, func(c gin.Context) {// 創建在 goroutine 中使 ⌘ Read more

⤋ Read More

my friend is getting into snh48 and its sister groups and it makes me miss being a fan but my oshi (shen mengyao) graduated so i don’t have any reason to follow them. but the thing about snh48 is that it’s a group full of messy toxic lesbians with mental problems so there is always some wild ass drama going on. you can never leave snh48 standom

⤋ Read More
In-reply-to » my camcorder battery & mini dvds came in the mail so i did a test recording! it's so cool i love the crap quality. i do hope the memory stick arrives soon though because for the discs i can't get them on my computer (not even a rom drive filesystem mount) without "finalizing" the disc which is like an old camcorder thing. i still think i'll prefer disc recording though even if a limit of 30 minutes (or longer for lower quality) is strict. i like limitations like that

@kat@yarn.girlonthemoon.xyz i also like the separation inherent with using dedicated devices. like i have a DAP, a fiio X1 ii from 2019, and it’s still going strong. it’s perfect for on the go music listening and i never have to worry about like going somewhere with no reception and the music drops out. it’s all local AND the battery lasts longer because i’m not using wi-fi or bluetooth or data. also i can directly access the file system and just add files anytime. this goes for my point & shoot and other devices too. i love this shit i’m such a nerd

⤋ Read More

Go 指針進階:從入門到被虐,90- 開發者都踩過這些坑!
指針是 Go 語言中最強大但也最容易出錯的特性之一。本文將帶你從基礎概念到高級應用,全方位掌握 Go 指針的使用技巧。無論你是初學者還是老手,都能在這裏找到價值。一、指針基礎:從零開始什麼是指針? Go 語言中的指針是一個用來存儲變量內存地址的變量,可以使用 & 運算符獲取變量的地址,使用 `` 運算符獲取指針所指向的變量的值,可以進行運算來移動指針。var a int = 10var p ⌘ Read more

⤋ Read More

如何使用 Golang 進行 Kafka 的監控
Kafka 是一個高吞吐量、可擴展的分佈式消息系統,廣泛應用於實時數據流處理場景。監控 Kafka 是確保其平穩運行和及時處理問題的關鍵。本文將介紹如何使用 Golang 來執行 Kafka 的監控任務。前置準備—-安裝依賴庫: 安裝 Sarama,用於 Kafka 的操作$ go get github.com/Shopify/sarama 安裝 Kafka 管理擴展$ go get g ⌘ Read more

⤋ Read More

Go: 如何寫出內存泄露的程序
不管使用什麼語言,內存泄露是經常遇到的一類問題,然而使用 Go 語言編寫內存泄露的代碼卻不容易,本文將列舉幾個可能出現內存泄露的場景,從反例中學習如何避免內存泄露。資源泄露—-不關閉打開的文件當你不再需要一個打開的文件, 正常你需要調用它的 Close 方法, 如果你不調用 Close,就有可能文件描述符達到最大限制,無法再打開新的文件或者連接, 程序會報too many open files ⌘ Read more

⤋ Read More

爲你的 Go 應用添加定時任務
在 Linux 上,我們經常使用計劃任務來執行一些定時任務,比如,在凌晨執行數據庫備份、進行賬務日結操作等。在我們的 Golang 應用中,我們也想執行一些定時任務,怎麼辦?cron 是 Golang 的一個定時任務庫,被廣泛應用於 Golang 應用中。cron 目前使用的 V3 版本,默認支持 Linux cron 表達式,沒有秒的字段。Linux cron 表達式格式:      comma ⌘ Read more

⤋ Read More

really wanna make an ssh zine app inspired by a telnet zine cms i found on github. i’m gonna probably go ahead with the telnet zine idea i have if i can get people for it but if i could build my own ssh mirror for it with golang and the charmbracelet wish library that’d be epic

⤋ Read More

(#td7zniq) I’m pretty happy with my Clownflare replacement solution. I’m going to start progressively migrating off Cloudflare soon™, but firs …
I’m pretty happy with my Clownflare replacement solution. I’m going to start progressively migrating off Cloudflare soon™, but first i need to take what I’ve built and commoditized it into something that that’s reusable and easily usable by others. This likely means Packer image and Terraform module. Once that’s done I’ll think about how to build a half decent wAF ( _Web Application Firewall … ⌘ Read more

⤋ Read More

Finally spending the time/effort today (on my day off) to see if I can get a working prototype and proof-of-concept self-hosted alternative to …
Finally spending the time/effort today ( on my day off) to see if I can get a working prototype and proof-of-concept self-hosted alternative to Clownflare going. Components I’m using so far are: Alpine Linux ( may swap this out for µLInux at some point), Wireguard, Caddy. ⌘ Read more

⤋ Read More

** Year in review, 2024 **
As a treat, I figured I could write a year in review kinda thing, too. In no particular order here are some reflections organized into some mostly sensical categories.

Health

Since recovering from my brain bleed and the subsequent repair procedures, this year I’ve enjoyed getting back into a routine of exercising. I’ve never been one to track numbers, or reps, or distances — I mostly exercise because I enjoy doing it. This year I got back into going for regular short runs, very long walks (sorry aging d … ⌘ Read more

⤋ Read More

設計模式 in Go: Observer
行爲模式旨在解決對象間通信和交互相關的問題,專注於定義那些複雜到無法靜態設計的協作策略,這些協作策略使得程序可以在運行時動態地進行職責派遣以實現更好的擴展。今天我們開始第 8 個行爲模式的學習 —— Observer(觀察者模式)。問題背景:—–觀察者模式用於當對象之間存在一對多關係時,即一個對象的變化需要傳播給多個其他對象。它允許被觀察對象的狀態發生變化時,其他依賴對象能自動收到通知並進行 ⌘ Read more

⤋ Read More

Go Protobuf 新增全新不透明 API
Protobuf 是 Google 的語言中立的數據交換格式。早在 2020 年 3 月,就發佈了 google.golang.org/protobuf 模塊,這是對 Go protobuf API 的重大修訂。該包引入了對反射的一流支持、一個 dynamicpb 實現和 protocmp 包,以便於測試。現在,我們將爲生成的代碼發佈一個新的 API,我們將說明創建新 API 的動機,並展示如何在 ⌘ Read more

⤋ Read More

高性能 Gin 框架原理學習教程
作者:jiayan 工作中的部分項目使用到了 gin 框架,因此從源碼層面學習一下其原理。1. 概述Gin 是一款高性能的 Go 語言 Web 框架,Gin 的一些特性:快速 基於 Radix 樹的路由,小內存佔用,沒有反射,可預測的 API 性能。 支持中間件 傳入的 HTTP 請求可以由一系列中間件和最終操作來處理,例如:Logger,Authorization,GZIP,最終操作 D ⌘ Read more

⤋ Read More

(#6db5eia) @mckinley@mckinley I honestly don’t really know how to do this is the problem. I’d love it if I could setup a Minecraft server for m …
@mckinley I honestly don’t really know how to do this is the problem. I’d love it if I could setup a Minecraft server for my kids and they could play without a Microsoft (silly) Live account 🤣 ( seriously fuck Microsoft, they can go to hell!) ⌘ Read more

⤋ Read More

Ten Mythical German Beasts Guaranteed to Give You Nightmares
Pretty much every country and culture around the world has a set of creepy mythical beasts as part of their ancient folklore. All over the globe, our ancestors have passed down oral traditions and tall tales about strange things that go “bump” in the night. Just as much as anywhere else on earth, Germany has […]

The post [Ten Mythical German Beasts Guaranteed to Give You Nightmares](https://listverse.com/2024/12/ … ⌘ Read more

⤋ Read More

Golang 中的 Context 如何讓代碼更智能、更安全、更易於擴展
Go 開發中,context 包已經成爲一個必不可少的工具。它提供了一種在不同的 goroutine 之間傳遞請求範圍內變量、取消信號和截止時間的方法。通過合理地使用 context,我們可以使代碼變得更智能、更安全,並且更易於擴展。本文將詳細探討 context 的作用以及如何在實際開發中應用它。什麼是 Context?————context 是 Go 1.7 引入的一個標準庫 ⌘ Read more

⤋ Read More

設計模式 in Go: Strategy
行爲模式旨在解決對象間通信和交互相關的問題,專注於定義那些複雜到無法靜態設計的協作策略,這些協作策略使得程序可以在運行時動態地進行職責派遣以實現更好的擴展。 今天我們開始第 9 個行爲模式的學習 —— Strategy(策略模式)。問題背景:—–策略模式用於當有多種可以互換的算法或策略來完成特定任務時。使用這些算法的客戶端不需要知道算法的具體實現細節。解決方案:—–定義一個所 ⌘ Read more

⤋ Read More

(#3nxy6qq) @bender@bender Bahahaha in hindsight I got rid of that 🤣 Just silly nonsense, just one of those things when you create an accou …
@bender Bahahaha in hindsight I got rid of that 🤣 Just silly nonsense, just one of those things when you create an account on yet-another silly centralized platform(s) and go “fuck” someone’s already taken the username I want 😅 ⌘ Read more

⤋ Read More

(#2zve52q) @sorenpeter No I agree. I think if the feed doesn’t hint at a nick, just default to displaying the bare domain. These sorts of things …
@sorenpeter @darch.dk No I agree. I think if the feed doesn’t hint at a nick, just default to displaying the bare domain. These sorts of things btw need to go into a Client recommendations / guidelines. If someone wants to start drafting up such I doc I will fully support this and help shape it 👌 ⌘ Read more

⤋ Read More

(#ywl4paq) Okay. Going to Settings -> Applications and creating a new Application Token with Repository Read/Write access works just fine. You c …
Okay. Going to Settings -> Applications and creating a new Application Token with Repository Read/Write access works just fine. You clone over https and push over https and user your username and token as creds. ⌘ Read more

⤋ Read More

(#malf2rq) Here’s a visual of what happened before I firewalled off all web traffic to force it to go through Cloudflare. Don’t even ask me how …
Here’s a visual of what happened before I firewalled off all web traffic to force it to go through Cloudflare. Don’t even ask me how my IP addresses got found out, but either this is malicious, incompetent or my wider ISP is being DDoS’d ( it’s happened before). Read more

⤋ Read More

設計模式 in Go: Mediator
行爲模式旨在解決對象間通信和交互相關的問題,專注於定義那些複雜到無法靜態設計的協作策略,這些協作策略使得程序可以在運行時動態地進行職責派遣以實現更好的擴展。今天我們開始第 7 個行爲模式的學習 —— Mediator(中介者模式)。問題背景:—–中介模式用於當一組對象需要以鬆散耦合的方式相互通信時。在複雜系統中,對象之間的直接通信會導致緊耦合和增加複雜性。中介模式有助於集中和控制對象間的通信 ⌘ Read more

⤋ Read More

Golang workspace 多模塊工作區是真的好
最近,使用了 Golang workspace,它是真的好。今日推薦給大家。Golang 在 1.18 版本開始支持多模塊工作區。使用多模塊工作區,可以幫助您同時在多個模塊中編寫代碼,並在這些模塊中輕鬆構建和運行代碼。要創建多模塊工作區,請確保你安裝的 Go 版本在 1.18 及以上纔行。我們以 Windows 爲例,演示如何創建工作區。一、創建一個目錄叫 workspace,這個是工作區的名稱。 ⌘ Read more

⤋ Read More

微服務的終極 Golang 框架:GoFr
前言–Go 語言因其出色的併發處理能力和簡潔的語法,成爲開發微服務的理想選擇。而 GoFr 框架則是一個專門爲構建 Go 微服務而設計的框架,它提供了一套完整的工具和最佳實踐,幫助開發者快速構建可靠的微服務應用。GoFr 框架簡介———GoFr 是一個專注於簡單性和性能的微服務框架。它的主要特點包括:零依賴:框架本身不依賴於任何第三方包 高性能:經過優化的路由和中間件系統 ⌘ Read more

⤋ Read More

使用 Buf 和 Nix 構建 Go 語言 gRPC 服務
在本文中,我們將探討如何在 Go 中構建一個可擴展且易於管理的 gRPC 服務。我們將使用 Buf 來管理 Protocol Buffers(Protobuf),並藉助 Nix 創建一個一致且可復現的開發環境。Buf 提供了一種高效且有組織的方式來管理 Protobuf,而 Nix 則確保開發環境在不同系統之間的一致性。通過本指南的學習,你將能夠構建一個具有清晰代碼結構和良好可維護性的完整 gRP ⌘ Read more

⤋ Read More

Monero Tech meeting scheduled for 30 December 2024 1800 UTC
The next Monero Tech meeting is scheduled to take place on Monday, December 30 2024 at 18:00 UTC, in the #no-wallet-left-behind 1 IRC-Libera/Matrix channels:

Based on the opinions given here2 I decided to go back to the No Wallet Left Behind Matrix room and IRC channel for the next i.e. coming Monday’s meeting, and to not contiune to hold meetings like the last one in the -dev Matrix room and IRC channel.

This meeting’s c … ⌘ Read more

⤋ Read More

Monero Tech meeting scheduled for 23 December 2024 1800 UTC
The next Monero Tech meeting is scheduled to take place on Monday, December 23 2024 at 18:00 UTC, in the #no-wallet-left-behind 1 IRC-Libera/Matrix channels:

Based on the opinions given here2 I decided to go back to the No Wallet Left Behind Matrix room and IRC channel for the next i.e. coming Monday’s meeting, and to not contiune to hold meetings like the last one in the -dev Matrix room and IRC channel.

This meeting’s c … ⌘ Read more

⤋ Read More

設計模式 in Go: Template Metho
行爲模式旨在解決對象間通信和交互相關的問題,專注於定義那些複雜到無法靜態設計的協作策略,這些協作策略使得程序可以在運行時動態地進行職責派遣以實現更好的擴展。今天我們開始第 5 個行爲模式的學習 —— Template Method(模版方法)。問題背景:—–在設計一系列步驟的算法時,有些步驟可能在各個子類中都是通用的,而其他步驟則會有所不同。如果我們每個子類都實現所有步驟,將會產生大量重複代 ⌘ Read more

⤋ Read More

A new addition to my domain collection
My list of domains is constantly changing. Sometimes it grows, and sometimes it shrinks as I let go of a domain I no longer need. The good thing is that letting go of a domain makes room for new ones. Just yesterday I made a spontaneous purchase of another .de domain: jan-lukas.de, to go along with janlukas.de, which I already own and sometimes use for emails. ⌘ Read more

⤋ Read More

Go gRPC 和微服務架構的基礎與設計與實戰
微服務架構是一種將單體應用分解成一組獨立的小服務的架構模式,服務之間通過輕量級協議(如 HTTP 或 RPC)進行通信。相比傳統的單體架構,微服務架構具有高靈活性和擴展性,使團隊可以在開發、測試和部署上實現高度的自治。要深度理解微服務架構的基礎和設計。一. 微服務基礎1. 微服務架構的核心基礎—————–服務劃分(Service Partitioning) 微服務的核心是將應 ⌘ Read more

⤋ Read More

NSQ 分佈式消息隊列的最佳實踐 - Go 語言實戰指南!
NSQ 是由 Go 語言編寫的一個分佈式實時消息隊列系統,以其簡單、高性能和可擴展性著稱。今天咱們就來深入瞭解如何在實際項目中最佳地運用 NSQ,讓你的系統既穩定又高效!NSQ 架構簡介——–NSQ 採用分佈式架構,主要包含以下核心組件:nsqd: 接收、排隊、投遞消息的守護進程 nsqlookupd: 管理拓撲信息並提供發現服務 nsqadmin: Web 管理界面,用於實 ⌘ Read more

⤋ Read More

設計模式 in Go: State
行爲模式旨在解決對象間通信和交互相關的問題,專注於定義那些複雜到無法靜態設計的協作策略,這些協作策略使得程序可以在運行時動態地進行職責派遣以實現更好的擴展。今天我們開始第 4 個行爲模式的學習 —— State Pattern(狀態模式)。問題背景:———當一個對象的行爲需要根據其內部狀態的變化而變化時,通常的做法是使用 if-else 語句來處理不同的情況。然而,隨着狀態和行爲數量的 ⌘ Read more

⤋ Read More

golang 新一代標準日誌庫 slog
log/slog 是 Go 1.21 引入的一個新的日誌記錄包,旨在提供比傳統 log 包更靈活和現代化的日誌功能。它支持結構化日誌、可配置的日誌級別、靈活的日誌輸出格式等功能,彌補了舊版 log 包的不足。對比舊版 log 包 | 特性 | log | slog || — | — | — || 日誌級別支持 | 無 | 內置支持(Debug、Info 等) || 結構化日誌 | ⌘ Read more

⤋ Read More