Skip to content

Instantly share code, notes, and snippets.

@anthisfan
anthisfan / checkov-test-terraform.md
Last active January 2, 2026 04:07
checkov test (terraform)

checkov test

セットアップ
$ pip3 install checkov
テスト用 TF ファイル作成
adb logcat -s Unity
--------- beginning of main
01-02 09:31:30.768 30762 30762 V Unity : Context Type: GameActivity
01-02 09:31:30.780 30762 30850 I Unity : UnityApplication::CreateInstance
01-02 09:31:30.780 30762 30850 I Unity : GameActivity Package Version '3.0.5'
01-02 09:31:30.806 30762 30850 I Unity : Starting Game Loop
01-02 09:31:30.806 30762 30850 I Unity : Handle cmd APP_CMD_START(11)
01-02 09:31:30.813 30762 30850 I Unity : Handle cmd APP_CMD_RESUME(12)
01-02 09:31:30.834 30762 30850 I Unity : Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
01-02 09:31:30.850 30762 30850 I Unity : Handle cmd APP_CMD_WINDOW_INSETS_CHANGED(17)
@amuTBKT
amuTBKT / imgui_customnav_test.cpp
Last active January 2, 2026 04:08
Tying out shortcuts + auto focus items for a ImGui widget.
// code for: https://x.com/amu_mhr/status/2006940064711053355?s=20
extern int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...);
// dubious function to focus `InputText` widgets with nav cursor, this avoid having to press enter to edit them
// NOTE: `ImGui::Shortcut` handles focusing but not sure how to replicate that when using arrow keys (i.e no shortcut just navigation)
// This has a downside that items to the left/right of the input box cannot be reached using arrow keys (only up/down nav will work!)
auto AutoFocusNextItem = [](const char* item_label)
{
const ImGuiID item_id = ImGui::GetCurrentWindow()->GetID(item_label);
@ThreeDeeJay
ThreeDeeJay / UnityRendering.md
Created January 2, 2026 04:05 — forked from unitycoder/UnityRendering.md
Unity: Forward, Forward+, Deferred, Deferred+

https://discussions.unity.com/t/deferred/1579636/3

Forward

Render both, transparent and opaque objects, one at a time. For each object, we bind a list of lights that affect that it. On the GPU, we iterate over this list and accumulate lighting.

The upside of this approach is that this is dead-simple, and has a low CPU cost. For very simple scenes, this is a win.

Downsides are (a) overdraw, i.e. you pay for lighting pixels that will be later occluded by other geometry, (b) a smaller light limit, (c) incompatibility with GPU-driven rendering and GPU occlusion culling.

@saahityaedams
saahityaedams / scrub_epub_images.py
Created January 2, 2026 04:04
Utility script to scrub images from an epub
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "pillow",
# ]
# ///
"""Remove images from an EPUB file with interactive prompts."""
import zipfile
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Undertale Quest</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
body {
body {
font-size: 14px;
color: blue;
}
h1 {
font-size: 18px;
font-weight: bold;
}
@ONLym22
ONLym22 / aio-ssvid.js
Created January 2, 2026 04:01
Uploaded via ONLym Bot
/*
* AIO Downloader
* Base Url: https://ssvid.net
* Creator: krsna_081
** https://whatsapp.com/channel/0029Vb72biW0QeasfexABN3H **
*/
import axios from "axios";
@forkyau
forkyau / hourly_rainfall_data-2026-01-02|11-45.csv
Created January 2, 2026 04:01
GIST created by python code
id station stationid value unit obstime date
0 流浮山 RF001 0 mm 2026-01-02T11:45:00+08:00 2026-01-02
1 湿地公园 RF002 0 mm 2026-01-02T11:45:00+08:00 2026-01-02
2 水边围 N12 0 mm 2026-01-02T11:45:00+08:00 2026-01-02
3 石岗 RF003 0 mm 2026-01-02T11:45:00+08:00 2026-01-02
4 大美督 RF004 M mm 2026-01-02T11:45:00+08:00 2026-01-02
5 大埔墟 RF005 0 mm 2026-01-02T11:45:00+08:00 2026-01-02
6 北潭涌 RF006 0 mm 2026-01-02T11:45:00+08:00 2026-01-02
7 滘西洲 RF007 0 mm 2026-01-02T11:45:00+08:00 2026-01-02
8 西贡 N15 0 mm 2026-01-02T11:45:00+08:00 2026-01-02
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>For Aashima ❤️</title>
<style>
body{
margin:0;
min-height:100vh;