Skip to content

Instantly share code, notes, and snippets.

@rheatin
rheatin / free-game-claimer
Last active June 11, 2025 07:23
[docker] some #docker containers and #docker-compose files
#crontab -e
55 19 * * * docker run --rm -it -p 6080:6080 -v /mnt/data/fgc:/fgc/data -e NOTIFY='tgram://1608892328:AAH6e3doBhgMkB0l66p2nMSq7UeHFP2Vdeo/1627657739' --pull=always ghcr.io/vogler/free-games-claimer node epic-games
@rheatin
rheatin / examples.vba
Last active June 27, 2022 00:43
[excel solutions] some functions for #excel
Sub Mycode()
For i = 1 To 1000
Dim year, month, day As Integer
year = Int(2000 * Rnd) + 1
month = Int(12 * Rnd) + 1
day = Int(30 * Rnd) + 1
Cells(i, 1) = year & "年" & month & "月" & day & "日 something happened!"
Next i
End Sub
@rheatin
rheatin / CRC-8-DVB-S2.lua
Last active April 7, 2022 08:32
[crc] the #algorithm of #crc
local function reverse(x)
-- reverse bits of a byte
local y = 0
for j = 1, 8 do
y = y * 2 + (x&1)
x = x >> 1
end
return y
end