Skip to content

Instantly share code, notes, and snippets.

View DinoChiesa's full-sized avatar

Dino Chiesa DinoChiesa

View GitHub Profile
@DinoChiesa
DinoChiesa / apigee-hybrid-gather-all.sh
Last active November 24, 2025 19:58
Apigee Hybrid Gather All #sh
#!/bin/bash
# -*- mode:shell-script; coding:utf-8; sh-shell:bash -*-
# Copyright © 2025 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
@DinoChiesa
DinoChiesa / OAuth-authz-code-flow.md
Last active November 6, 2025 18:38
OAuth Authorization code flow with MCP

Sequence Diagram

sequenceDiagram
participant UA as User-Agent
participant Client as VSCode
participant RS as Apigee
participant IDP as SSO
participant Upstream as MCP

Client->>+RS: GET/POST request with NO Access Token
@DinoChiesa
DinoChiesa / protected_mcp-authz.rego
Created October 29, 2025 22:56
Protected MCP Authz #rego
package protected_mcp.authz
import data.domains_and_roles
import data.roles_and_permissions
import data.users_and_roles
default allowed := {}
allowed := {"allowing_role": role_and_source, "permission": j} if {
domain_roles := [sourcedroles |
@DinoChiesa
DinoChiesa / Gemini-Plan.md
Last active September 15, 2025 19:28
Gemini- Plan/Review/Approve/Implement

The Plan, Approve, Implement loop

  1. Planning

    • Restate the requirements as you understand them.
    • Develop a proposed implementation plan with specific steps, formatted as a checklist.
    • Take your time building the plan, and be thorough. Consider the existing code, system architecture, and runtime environment. It's ok to explore several different alternatives if that is appropriate. In the end, you need to settle
@DinoChiesa
DinoChiesa / Gemini-frag.md
Created September 4, 2025 17:18
Gemini CLI instructions to make changes within git commit

Protecting changes with Git commits

When I ask you to manage code modifications, additions, or deletions to code that is in a directory that is under git version control, you will follow a specific workflow to manage changes through a git commit.

You can run the command "git rev-parse --is-inside-work-tree" to determine if the directory is under git version control. It will return an error if not.

When the firectory is under git version control:

@DinoChiesa
DinoChiesa / apispecloader.py
Created September 3, 2025 21:33
Apispecloader - loads an OpenAPI Spec from a file or from API Hub #py
# Copyright © 2025 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@DinoChiesa
DinoChiesa / Gemini.md
Last active August 7, 2025 21:46
Dino's Gemini.md file

General

  • Avoid obsequiousness. If I ask a reasonable question, don't praise. Just answer. If I ask a question that seems non-sensical, respond non-judgmentally but it's ok to be skeptical and challenge a suggestion.

  • Be economical in prose responses. "Makes sense" is better than "Oh, good question! you are on the right track by asking that."

  • When I ask a question, if things aren't clear, state that. When you're not

@DinoChiesa
DinoChiesa / README.md
Created August 5, 2025 20:09
Dashboard for Gemini Code Assist metrics

tl;dr

To use this, Just copy and paste the JSON from gca_metrics_dashboard.json into a new Cloud Observability dashboard.

Prerequisites for Code Acceptance Metrics

For the "Code Acceptance Metrics" section of the dashboard to work, you must have the following set up in your Google Cloud project:

  1. Enable Gemini for Google Cloud Logging: Logging must be enabled for your project to collect
@DinoChiesa
DinoChiesa / eval-after-load.el
Created July 23, 2025 21:19
Emacs - Adjust csharp-ts-mode indentation rules
(eval-after-load "csharp-mode"
'(progn
;; Adjustments for indentation.
;; This one is for the open curly for the using statement.
;; (The using _directive_ (for import at top of file) is different.)
(setf (cdr (car csharp-ts-mode--indent-rules))
(cons
'((parent-is "using_statement") parent-bol 0)
(cdr (car csharp-ts-mode--indent-rules))))
@DinoChiesa
DinoChiesa / GEMINI.md
Created July 21, 2025 19:52
Gemini MD to reduce sycophancy

General

  • Avoid obsequiousness. If I ask a reasonable question, don't praise. Just answer. If I ask a question that seems non-sensical, respond non-judgmentally but it's ok to be skeptical and challenge a suggestion.

  • Be economical in prose responses. "Makes sense" is better than "Oh, good question! you are on the right track by asking that."

  • When I ask a question, if things aren't clear, state that. When you're not