watch -n 60 rm -rf /tmp/yarn-avatar-* in a tmux because all of a sudden, without warning, yarnd started throwing hundreds of gigabytes of files with names like yarn-avatar-62582554 into /tmp, which filled up the entire disk and started crashing other services.
abucci@buc:~/yarnd/yarn$ make preflight
Checking Go version ... [ ERR ]
Go 1.16+ is required, found go1.22.5
FATAL: 🙁 preflight failed
make: *** [Makefile:33: preflight] Error 1
🤔
This is completely insane!
abucci@buc:/tmp$ du -sh /tmp/yarnd-avatar-*
564M /tmp/yarnd-avatar-3024946878
7.2G /tmp/yarnd-avatar-3122347915
11G /tmp/yarnd-avatar-3533381443
445M /tmp/yarnd-avatar-441914658
I’m going to have to shut down my server soon. This looks like some kind of DDoS. Whether intentional or not it’s filling up the disk at an unsustainable rate.
There are also a bunch of log messages scrolling by. I’ve never seen this much activity in the log:
Jul 25 01:37:39 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:39 (149.71.56.69) "GET /external?nick=lovetocode999&uri=https://pagez.co.uk/services/your-own-100-fully-owned-online-vi>
Jul 25 01:37:39 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:39 (162.211.155.2) "GET /twt/112135496802692324 HTTP/1.1" 400 12 826.65µs
Jul 25 01:37:40 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:40 (51.222.253.14) "GET /conv/muttriq HTTP/1.1" 200 36881 20.448309ms
Jul 25 01:37:40 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:40 (162.211.155.2) "GET /twt/112730114943543514 HTTP/1.1" 400 12 663.493µs
Jul 25 01:37:40 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:40 (27.75.213.253) "GET /external?nick=lovetocode999&uri=http%3A%2F%2Falfarah.jo%2FHome%2FChangeCulture%3FlangCode%3Den>
Jul 25 01:37:40 buc.ci yarnd[829]: time="2024-07-25T01:37:40Z" level=error msg="http://bynet.com.br/log_envio.asp?cod=335&email=%21%2AEMAIL%2A%21&url=https%3A%2F%2Fwww.almanacar.c>
Jul 25 01:37:40 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:40 (162.211.155.2) "GET /twt/111674756400660911 HTTP/1.1" 400 12 545.106µs
Jul 25 01:37:40 buc.ci yarnd[829]: time="2024-07-25T01:37:40Z" level=warning msg="feed FetchFeedRequest: @<lovetocode999 http://alfarah.jo/Home/ChangeCulture?langCode=en&returnUrl>
Jul 25 01:37:41 buc.ci yarnd[829]: [yarnd] 2024/07/25 01:37:41 (162.211.155.2) "GET /twt/112507964696096567 HTTP/1.1" 400 12 838.946µs
Something really weird is going on?
Go 語言定時任務 time-Sleep 和 time-Tick 的優劣對比分析
golang 寫循環執行的定時任務,常見的有以下三種實現方式 1、time.Sleep 方法:for { time.Sleep(time.Second) fmt.Println(“我在定時執行任務”)}2、time.Tick 函數:t1:=time.Tick(3time.Second)for { select { case <-t1: fmt.Println(“t1定時 ⌘ Read more
Golang - range 迭代器揭祕
簡介我們正在使用 Go 語言編寫 Dolt[1] ,這是世界上第一個版本控制的 SQL 數據庫。像大多數大型 Go 代碼庫一樣,我們有很多需要迭代的集合類型。 Go 1.23 的新特性 [2] 中,你現在可以使用 range 關鍵字來迭代自定義集合類型。這是如何工作的? 這是個好主意嗎? 讓我們深入探討一下。如果你想運行本教程中的任何代碼,你需要 安裝 Go 1.23 發佈候選版 [3] ,或者在 ⌘ Read more
使用 Go 語言創建你的第一個 2D 遊戲
Pixel 是一個用 Go 語言編寫的 2D 遊戲開發庫, 它爲開發者提供了一套簡潔而強大的工具, 讓創建像素風格的遊戲變得輕而易舉。本文將深入探討 Pixel 庫的核心特性, 並通過豐富的示例來展示如何使用它來構建引人入勝的 2D 遊戲。Pixel 的誕生與理念————Pixel 誕生於開發者對簡單而高效的 2D 遊戲開發工具的渴望。它的設計理念是 “手工打造”, 這意味着庫的每 ⌘ Read more
Genkit:新一代基於 Go 的 AI 應用開發框架
Google 推出了 Genkit for Go,這是一個開源框架,用來以 Go 語言原生構建 AI 應用與雲服務。該項目是 Google Firebase 和 Go 團隊聯手合作的最新成果。Genkit for Go 於 7 月 17 日正式推出,目前版本處於 alpha 階段。Gophers 能夠通過它將 Go 的性能和併發優勢與 Genkit 的庫和工具相結合,從而來構建生成式 AI 應用程 ⌘ Read more
Post-vacation bike tour
Today was my first workday after summer vacation, and with the weather being pleasant – not too hot, and no rain – I decided to finish work a bit early and go for a 39-kilometer bike tour through the surrounding area. ⌘ Read more
Is ROG Ally X the best new portable PC for gaming on the go?
A huge battery and powerful internals make ASUS’ handheld a great choice for taking your PC games library with you, even though Windows holds it back. ⌘ Read more
(I don’t really trust Android, though, and I suspect that apps can still install background services that are always active. Pure speculation and paranoid on my part, but still.)
Which is fair, but I would say the GrapheneOS devs in particular are also quite paranoid about this stuff and go to great pains to make sure this stuff can be controlled by the user.
CrowdStrike IT meltdown a nightmare scenario that may have been inevitable
New cyber threats against software networks appear every hour and fixes are needed just as often. They can and will go wrong. ⌘ Read more
@prologic@twtxt.net Yeah that is probably what was happening. I wish that go build could embed the values that go install does.
@movq@www.uninformativ.de This outage did affect me, though not much, via the university where my wife teaches and where I teach sometimes. They actually sent out an alert in their emergency alert system (the one they use to alert people of extreme weather events and bomb threats, mostly), telling people that all IT systems were down.
A friend of mine elsewhere pointed out that they pushed this change on a Friday, which of course no software developer with any experience would ever, ever, ever do. I have to assume there’s some toxic management at CrowdStrike, but who knows. Even more reasons to sympathize with the poor folks who are probably going to be working nights and weekends to clean up this mess.
Enums in Go
1 points posted by DizzyVik ⌘ Read more
CrowdStrike
⌘ Read more
CrowdStrike
⌘ Read more
Go 語言的 Lodash 風格庫
在 JavaScript 的世界裏,Lodash 是一個家喻戶曉的工具庫,它提供了豐富的函數,方便開發者操作數組、對象、字符串等等。Lodash 極大地提高了 JavaScript 開發者的效率,也讓代碼更加簡潔易讀。在 Go 語言 1.18 版本之前,由於缺乏泛型,我們很難實現像 Lodash 這樣功能強大且類型安全的工具庫。然而,隨着 Go 1.18 泛型的引入,這一切都發生了改變。sambe ⌘ Read more
Golang 實現坦克世界
Golang 實現坦克世界項目地址: https://github.com/gofish2020/tankgame 歡迎 Fork && Star遊戲效果—-本項目基於遊戲引擎 Ebitengine 開發,這裏有很多的實例 https://ebiten-zh.vercel.app/examples/ 便於邊學邊用程序下載到本地,直接 go run main.go即可看效果。開發使用的go1.2 ⌘ Read more
Before going to sleep, a quick walk around the block. 🌔 ⌘ Read more
在 Go 中如何使用 go:embed 指令嵌入靜態文件
有時候,將配置文件、模板甚至整個前端應用直接嵌入到 Go 二進制文件中,是一種提高應用部署效率和簡化操作的有效方法。自從 Go 1.16 版本起,Go 語言官方引入了 //go:embed 指令,這使得嵌入靜態資源變得異常簡單而直接。本文將詳細介紹如何在你的 Go 應用中使用這一強大的特性。什麼是 go:embed//go:embed 在 Go 1.16 版本中被加入,這也是我接觸 Go 語言的第 ⌘ Read more
理解並使用 Golang 的 “omitempty” 特性
在使用 Go (Golang) 並將數據編碼爲 JSON 時,您可能會遇到這樣的情況:如果某些字段的值爲空,則需要從編碼輸出中省略這些字段。這就是 Golang 的 omitempty 功能發揮作用的地方。struct 字段標記中的 omitempty 選項會告訴編碼器,如果字段爲空值,則跳過該字段。什麼是 “Empty Value”?在 Go 中,Empty Value 的定義是:布爾類型爲 ⌘ Read more
Kubestronaut in Orbit: Eleni Grosdouli
Get to know Eleni This week’s Kubstronaut in Orbit, Eleni Grosdouli, brings diverse experiences to her role as a DevOps Consulting Engineer at Cisco Systems. She’s the go-to person for DevOps and Kubernetes Automation, with a passion for… ⌘ Read more
通過實例理解 Go 訪問和操作數據庫的幾種方式
關係數據庫操作是 Go 應用開發中的重要一環,尤其是 Go Web 應用、微服務等。作爲 Gopher,我們需要了解幾種主流的數據庫訪問和操作方法,以便在項目中做出適當的選擇。我個人在日常開發中較少涉及 CRUD 類應用,因此使用 Go 訪問和操作數據庫的機會並不多,在這方面也算是有一些 “短板”。通過在這篇文章中對數據庫訪問方式進行全面的梳理,我也算是補全一下技能樹,同時也能爲讀者小夥伴提供一些 ⌘ Read more
Go 語言的 Web 開發利器:Templ - HTMX 打造交互式體驗
在 Web 開發領域,Go 語言以其簡潔、高效和強大的併發能力著稱。Templ 和 HTMX 則是與 Go 完美契合的工具,它們分別負責頁面的渲染和交互邏輯,共同打造出現代化的 Web 應用。本文將深入探討 Templ 和 HTMX 的核心概念、使用方法以及如何結合 Go 語言構建出色的 Web 應用。Templ:Go 語言的模板引擎—————-Templ 是 Go 語言自帶的 ⌘ Read more
在 Go 項目中使用 Redis 的幾個實用建議
今天來聊一聊 Redis,主要是聊一些在 Go 項目中使用 go-redis 代碼上的一些建議。在上代碼之前我還是要廢話幾句,在大家開發需求用到 Redis 時一定要多想個兩分鐘 “我是不是把 Redis 當數據庫用了?” 因爲數據在數據庫和 Redis 裏存兩份就就得考慮它們的一致性怎麼維護,賊麻煩,而這個一致性不做上線後還經常會出 BUG,所以不是必要我一般不用 Redis。需要過期的數據肯定 ⌘ Read more
Long run: 9.33 miles, 00:10:21 average pace, 01:36:32 duration
easy run on the treadmill today since we have a lot going on and i had to watch the kiddos. split into three 5kms with first and last at about 10:55 pace, and the middle 5km at about a 9:14 pace. nothing crazy, felt good, kept it in the blue and finished it strong.
#running #treadmill
全面掌握 Go 語言 errors 標準庫:使用指南與源碼深度解析
前言–在 Go 語言中,錯誤處理是一個重要的部分。Go 官方提供了一個輕量級的 errors 標準庫,用於創建和處理錯誤。本文將介紹如何使用 Go 的 errors 標準庫,並深入解析其源碼實現。準備好了嗎?準備一杯你最喜歡的咖啡或茶,隨着本文一探究竟吧。 Go 版本:1.22.0error 接口——–下面的內容會提到 error 接口,因此我們有必要先了解一下 error 接口的相 ⌘ Read more
Go 語言實現 Base64、Base58 編碼與解碼,很簡單
在 Go 語言中,實現 Base64 和 Base58 編碼與解碼是非常常見的任務。Go 標準庫中已經包含了 Base64 的編碼與解碼函數,而 Base58 需要使用第三方庫來實現。下面分別介紹 Base64 和 Base58 編碼與解碼的實現方法。Base64 編碼與解碼Go 標準庫的encoding/base64包提供了 Base64 編碼與解碼的功能。示例代碼package mainimp ⌘ Read more
Go 1-23 的 os-CopyFS:告別第三方庫,輕鬆複製目錄
在 Go 1.23 版本中,標準庫 os 包引入了一個名爲 CopyFS 的新函數,它提供了一種僅使用標準庫函數即可複製目錄的便捷方法。從此,開發者無需再依賴第三方庫來完成這項常見任務。本文將深入探討 os.CopyFS 函數的功能、用法以及其帶來的優勢。告別第三方庫——在 os.CopyFS 出現之前,Go 開發者通常需要藉助第三方庫(如 github.com/otiai10/copy) ⌘ Read more
Gaby - Golang 社區機器人
Gaby 是一個實驗性的新機器人, 在 Go 問題跟蹤器中以 @gabyhelp[1] 的身份運行, 試圖自動化各種機器可以合理完成的瑣碎事務, 同時也試圖發現機器可以合理完成的新事物。gaby 這個名字是 “Go AI Bot” 的縮寫, 因爲這個實驗的目的之一是瞭解 LLM 可以有效用於哪些方面, 包括識別它們不應該用於哪些方面。一些 gaby 功能將涉及 LLM; 其他功能則不會。指導原則是 ⌘ Read more
「Go 開源」freeze:一個能將源代碼轉換成圖片的工具
大家好,我是漁夫子。今天給大家推薦的開源工具是 freeze,該工具可以將源代碼或終端中的輸出內容轉換成對應的圖片。如下圖效果:比如,我們想把一個 go 語言編寫的源代碼 main.go 轉換成圖片,則可以按如下方式操作:freeze main.go –output main.png生成的效果如下:你看,就把對應的代碼按照高亮的形式生成了圖片。實現原理那這個 freeze 的實現原理是什麼呢?通 ⌘ Read more
一款用於實時監控 PostgreSQL 數據變化的 Go 語言庫
在現代應用開發中,實時數據處理扮演着至關重要的角色。實時監控數據庫變化,並對這些變化做出迅速響應,是許多應用場景(如實時數據分析、緩存更新、事件驅動架構等)的核心需求。Flash 正是這樣一款應運而生的 Go 語言庫,它爲開發者提供了便捷高效的方式來管理 PostgreSQL 數據庫的實時變化。Flash 簡介——–Flash 是一款輕量級的 Go 語言庫,它利用事件管理機制,實現了對 ⌘ Read more
Go 性能度量利器,完全替代 io-Reader 和 io-Writer!
在 Go 語言的世界裏,io.Reader 和 io.Writer 接口是數據流處理的基石。然而,標準庫並沒有提供一種便捷的方式來追蹤通過這些接口傳輸的字節數。metered-io 庫應運而生,它提供了 io.Reader 和 io.Writer 的替代品,並能夠方便地獲取傳輸的字節總數,爲性能度量和監控提供了強大的支持。metered-io 庫簡介————–metered-io ⌘ Read more
Slurm: An HPC workload manager
Member post originally published on SuperOrbital’s blog by Sean Kane In this article, we are going to explore Slurm, a popular open-source high-performance computing (HPC1) workload manager, and discover what it is, why people use it, and how it… ⌘ Read more
聊聊 go 語言對於 socket 的抽象
寫在文章開頭——go語言對於網絡抽象做了非常通用且高性能的封裝,所以就從net包源碼入手介紹一下go語言對於socket的抽象。Hi,我是 sharkChili ,是個不斷在硬核技術上作死的 java coder ,是 CSDN 的博客專家 ,也是開源項目 Java Guide 的維護者之一,熟悉 Java 也會一點 Go ,偶爾也會在 C 源碼 邊緣徘徊。寫過很多有意思的技術博客,也還在 ⌘ Read more
I Made a Broken Hairdryer go BANG! ⌘ Read more
PolarisMesh 源碼系列 –Polaris-Go 註冊發現流程
導語北極星是騰訊開源的一款服務治理平臺,用來解決分佈式和微服務架構中的服務管理、流量管理、配置管理、故障容錯和可觀測性問題。在分佈式和微服務架構的治理領域,目前國內比較流行的還包括 Spring Cloud,Apache Dubbo 等。在 Kubernetes 的技術領域,也有以 Istio 爲代表的 ServiceMesh 技術。本篇 Blog 主要分析北極星的優勢,及其服務註冊發現的技術實現 ⌘ Read more
以 Go 語言爲例解釋什麼是僞共享以及如何解決
本文翻譯自:What’s false sharing and how to solve it (using Golang as example)譯文在解釋僞共享(false sharing)之前,有必要簡要介紹一下 CPU 架構中緩存是如何工作的。CPU 緩存中的最小單位是緩存行(cache line)(如今,CPU 中常見的緩存行大小爲 64 字節)。因此,當 CPU 從內存讀取一個變量時, ⌘ Read more
Golang 編寫範型集合,官方文檔未提及的訣竅
引言–Go 的泛型功能在 Go 1.18 版本中發佈, 至今已有兩年多了。我們正在使用 Go 開發 Dolt[1] , 這是世界上第一個支持版本控制的 SQL 數據庫。儘管我們有數十萬行 Go 代碼, 但我們並沒有大量使用泛型。我們在一些地方使用泛型 來加速代碼中的高流量部分 [2] , 但總的來說, 除了 slices[3] 和 maps[4] 包中的一些有用的庫方法外, 我們還沒有找到使用泛 ⌘ Read more
Go 語言的 CI-CD 實踐
CI/CD 是現代軟件開發流程中的關鍵實踐,它代表着持續集成(Continuous Integration)和持續部署(Continuous Deployment)或持續交付(Continuous Delivery)的組合。這些實踐旨在幫助軟件開發團隊更快、更頻繁地交付高質量的軟件產品。持續集成(CI): 持續集成是一種軟件開發實踐,開發團隊成員經常將他們的代碼變更集成到共享的代碼倉庫中。這通常每 ⌘ Read more
aconfig:Go 語言中簡潔高效的配置加載庫
在軟件開發過程中,合理處理配置項對於確保代碼的靈活性和可維護性至關重要。對於 Go 語言開發者們來說,aconfig庫提供了一個簡潔明瞭的解決方案來加載配置。本文將深入探討aconfig庫的特性和使用方法,向您展示如何高效地在 Go 項目中使用這個強大的配置加載工具。aconfig 的理念與特點————–aconfig是由開源社區提供的一個配置加載庫,它的設計理念基於實現配置加載 ⌘ Read more
使用 Go 提供的 Cookie 庫簡化 Cookie 操作
在 Web 開發中,Cookie 是一種非常常見的數據存儲形式。它可以幫助我們在客戶端和服務器之間保存一些狀態,如用戶的登錄狀態、偏好設置等。在 Go 語言中,操作 Cookie 有很多種方式,今天我們重點介紹一個名爲 cookie 的庫——這是一個可以使用結構體操作 Cookie 的庫。文章將詳細介紹 cookie 庫的使用方法、實際場景中的應用以及提供豐富的示例代碼。希望通過這篇文章,你能夠更 ⌘ Read more
go-cache: 採用 Cache-Aside 模式的多層 Go 緩存
在現代的應用程序開發中,緩存是提高性能和擴展性的關鍵技術之一。在 Go 語言的生態系統中,有許多優秀的緩存庫,其中之一便是go-cache。本文將詳細介紹go-cache庫及其使用方法,旨在幫助開發者更好地利用緩存提高應用程序的性能。什麼是 go-cache?————-go-cache是一個靈活的多層緩存庫,設計用於處理內存緩存和共享緩存。它採用了 Cache-Aside(旁路緩存 ⌘ Read more
如何架構優秀的 Go 後端 REST API 服務
REST(Representational State Transfer)是 Web 服務中廣泛使用的一種架構風格,其核心思想是使用 HTTP 協議出色地創建、讀取、更新和刪除(CRUD)資源。作爲一種靜態類型、編譯型語言,Go 在構建高效、可靠的 Web 服務時具有顯著優勢。使用 Go 語言構建 REST API 服務需要我們從多個方面入手,包括項目結構、框架選擇、數據庫操作、路由設計等。以下將 ⌘ Read more
Go 使用 interface 時的 7 個常見錯誤
寫在正文之前閱讀本文之前我們來先熟悉以下的代碼原則,如果你已經很熟悉這些內容,可以直接跳到正文。接口隔離原則:絕不能強迫客戶實現其不使用的接口,也不能強迫客戶依賴其不使用的方法。 多態性:代碼變化會根據接收到的具體數據改變其行爲。 里氏替換原則:如果你的代碼依賴於一個抽象概念,那麼一個實現可以被另一個實現所替代,而無需更改你的代碼。 抽象的目的不是爲了含糊不清,而是爲了創造一 ⌘ Read more
Pinellas County - Mile time trial: 1.03 miles, 00:06:40 average pace, 00:06:51 duration
after the warm-up the humidity hit me and i realized i was drenched and i could not stop sweating. it was going to be rough, and it was. kept a pretty steady pace which was great… and around 0.70 miles i upchucked in my mouth a bit, which was oh so great, so i eased off the gas towards the end. overall very happy with the effort since normally i do this in the cooler and drier conditions. in addition i have not been doing much speed work so this is great.
76.2F feels like 84.6F with 93% RH and 73.7F dew point
#running
萬字長文:Go 語言流行 ORM 框架 GORM 使用詳解
GORM 是 Go 語言中最受歡迎的 ORM 庫之一,它提供了強大的功能和簡潔的 API,讓數據庫操作變得更加簡單和易維護。本文將詳細介紹 GORM 的常見用法,包括數據庫連接、模型定義、CRUD、事務管理等方面,幫助大家快速上手使用 GORM 進行 Web 後端開發。安裝通過如下命令安裝 GORM:$ go get -u gorm.io/gorm你也許見過使用 go get -u github. ⌘ Read more
Haven’t been sleeping well lately. Going to bed late. Lots to do.