Skip to content

Instantly share code, notes, and snippets.

View lonegunmanb's full-sized avatar
💭
五行缺钱

lonegunmanb

💭
五行缺钱
  • Microsoft
View GitHub Profile
@lonegunmanb
lonegunmanb / README.md
Created February 9, 2026 10:38 — forked from emschwartz/README.md
The Most Popular Blogs of Hacker News in 2025

This is an OPML version of the HN Popularity Contest results for 2025, for importing into RSS feed readers.

Plug: if you want to find content related to your interests from thousands of obscure blogs and noisy sources like HN Newest, check out Scour. It's a free, personalized content feed I work on where you define your interests in your own words and it ranks content based on how closely related it is to those topics.

@lonegunmanb
lonegunmanb / gist:7da8685afdbc15c9f8d77493f2689f1e
Created January 2, 2026 02:13
Notebooklm Infographics 风格提示词 Gem
### **Gemini Gem 配置说明**
# Persona
你是一个专业的“信息图表提示词助手”(Infographic Prompt Assistant)。你的唯一目标是:通过一次只问一个问题的引导式对话,帮助用户构建一个用于生成信息图表的、结构化的 Gemini 提示词。你必须严格遵循下面的规则和工作流程。整个交互过程使用简体中文。
@lonegunmanb
lonegunmanb / gist:5f8006fe5859dfe462eb37222e79b56b
Created October 13, 2025 06:23
Prompt for azurerm2azapi migration
Prompt 1: For the Analyst Agent
---------
You are an expert-level cloud infrastructure engineer specializing in Terraform provider development and Azure APIs. Your mission is to decompose a specific Terraform resource into a manageable and efficient task list for its conversion into an `azapi_resource`.
**Primary Goal:**
Analyze the `azurerm_orchestrated_virtual_machine_scale_set` resource schema and create a condensed list of sub-tasks by grouping attributes, preparing for its conversion to an `azapi_resource`.
**Execution Steps:**
@lonegunmanb
lonegunmanb / docker_run_eol.sh
Last active March 26, 2024 06:47
docker run eol mcr image
docker run --rm --entrypoint=ash -e REGISTRY_USERNAME=<username> -e REGISTRY_ADMIN_PASSWORD=<password> -e REGISTRY_NAME=azureterraform.azurecr.io -e ARTIFACT_REFERENCE="azureterraform.azurecr.io/public/azterraform" -e SHA_DIGESTS="sha256:134342,sha256:3423423" ghcr.io/oras-project/oras:v1.1.0 -c "apk add curl bash && curl -H 'Cache-Control: no-cache, no-store' -sSL https://gist.githubusercontent.com/lonegunmanb/659b3b0ea566d5867ab1f23ebf2f11c0/raw/7c020f69fc4b8f0f0c3ba80948ec28feb244e661/eol.sh | bash"
@lonegunmanb
lonegunmanb / eol.sh
Last active March 26, 2024 06:42
eol mcr image
#!/usr/bin/env bash
# Login to the registry
echo "oras login"
oras login -u $REGISTRY_USERNAME -p $REGISTRY_ADMIN_PASSWORD $REGISTRY_NAME
# Split SHA_DIGESTS by comma and iterate over each digest
echo "oras eol"
for digest in $(echo $SHA_DIGESTS | tr "," "\n")
do
# Attach each digest
This file has been truncated, but you can view the full file.
2022-10-10T06:07:00.874Z [INFO] Terraform version: 1.3.1
2022-10-10T06:07:00.875Z [DEBUG] using github.com/hashicorp/go-tfe v1.9.0
2022-10-10T06:07:00.875Z [DEBUG] using github.com/hashicorp/hcl/v2 v2.14.1
2022-10-10T06:07:00.875Z [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2022-10-10T06:07:00.875Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2022-10-10T06:07:00.875Z [DEBUG] using github.com/zclconf/go-cty v1.11.0
2022-10-10T06:07:00.875Z [INFO] Go runtime version: go1.19.1
2022-10-10T06:07:00.875Z [INFO] CLI args: []string{"/bin/terraform", "plan"}
2022-10-10T06:07:00.876Z [TRACE] Stdout is a terminal of width 135
2022-10-10T06:07:00.876Z [TRACE] Stderr is a terminal of width 135
variable enable {
type = bool
}
variable region {
type = string
}
variable availability_zone {
type = string
@lonegunmanb
lonegunmanb / Stack.cs
Created January 17, 2020 02:31 — forked from mikhailshilkov/Stack.cs
Mock-based unit tests examples in C#
class MyStack : Stack
{
public MyStack()
{
var group = new SecurityGroup("web-secgrp", new SecurityGroupArgs
{
Ingress =
{
new SecurityGroupIngressArgs { Protocol = "tcp", FromPort = 22, ToPort = 22, CidrBlocks = {"0.0.0.0/0" } },
new SecurityGroupIngressArgs { Protocol = "tcp", FromPort = 80, ToPort = 80, CidrBlocks = {"0.0.0.0/0" } }
@lonegunmanb
lonegunmanb / taint_module.sh
Last active September 3, 2019 06:35
terraform taint all resources in a module, works on terraform 0.12.7
module=$1
for resource in `terraform show | grep module.${module} | tr -d ":" | tr -d "#"`; do
terraform taint ${resource}
done
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# Global settings