Skip to content

Instantly share code, notes, and snippets.

View and1truong's full-sized avatar
🎯

Hong Truong and1truong

🎯
View GitHub Profile

You can use the following Bash command to dump all current environment variables into a .envrc file:

export -p | sed 's/^declare -x //' > .envrc

Explanation:

  • export -p lists all exported environment variables.
  • sed 's/^declare -x //' removes the declare -x prefix, leaving just VAR=VALUE pairs.
  • > .envrc writes the output to the .envrc file.

2021 - SRE conferences

  • When Linux Memory Accounting Goes Wrong
  • Don't Follow Leaders or "All Models Are Wrong (and So Am I)"
  • Let the Chaos Begin—SRE Chaos Engineering Meets Cybersecurity
  • What's the Cost of a Millisecond?
  • What To Do When SRE is Just a New Job Title?
  • Capacity Management for Fun & Profit

2022 - SRE conferences

  • The 'Success' in SRE Is Silent
  • Building and Running a Diversity-focused Pre-internship Program for SRE
  • A Postmortem of SRE Interviewing
  • Self-Destructing Feature Flags
  • Tales from the VOID: The Scary Truth about Incident Metrics
  • How We Survived (and Thrived) During The Pandemic and Helped Millions...

2023 - SRE conferences

  • How the Sony PlayStation Network Does SRE
  • Unleashing Generative AI: Improving Developer Productivity in SRE
  • Patterns, Not Categories: Learning Across Incidents
  • Observability in the MLOps Lifecycle with Prometheus
  • Towards Zero Carbon: Implementing Sustainable Battery Lifecycle...
  • Leveraging Analytics for Technical Efficiency and Enhanced User Experience
  • 20 Years of SRE: Highs and Lows
  • Scam or Savings? A Cloud vs. On-Prem Economic Slapfight
  • Is It Already Time To Version Observability? (Signs Point To Yes.)
  • Capacity Constraints Unveiled: Navigating Cloud Scaling Realities
  • Sharding: Growing Systems from Node-scale to Planet-scale
  • Product Reliability for Google Maps
  • Build vs. Buy in the Midst of Armageddon
  • Compliance & Regulatory Standards Are NOT Incompatible with Modern Development..
@and1truong
and1truong / gemini-flash.md
Created January 9, 2025 04:05
What is the best practice for passing an array of strings as query parameters in an HTTP request, and how can it be effectively parsed on the server side?

Best Practices for Passing Arrays of Strings as Query Parameters:

  • URL Encoding:

    • Individual Encoding: Each string within the array should be URL encoded individually. This ensures proper handling of special characters like spaces, ampersands, and other reserved characters.
    • Example:
      • my_array[]=value1&my_array[]=value2&my_array[]=value3
  • Key-Value Pairs:

    • Repeated Keys: Use the same key for each value in the array, but with an empty index or a sequential index.
  • Example:

The 80/20 principle, also known as the Pareto Principle, states that 80% of results often come from 20% of efforts. To apply this principle to your SRE tasks, you can focus on identifying the most impactful actions that deliver the highest value with the least effort. Here's how you can implement it:

1. Identify Key Goals

  • Determine the top outcomes you want to achieve (e.g., improved system reliability, reduced incident frequency, faster response times).
  • Align tasks with these goals.

2. Audit Your Current Workload

  • List out all your daily, weekly, and monthly tasks.
We couldn’t find that file to show.