Skip to content

Instantly share code, notes, and snippets.

View electricjesus's full-sized avatar
🐅

Seth Malaki electricjesus

🐅
View GitHub Profile
@electricjesus
electricjesus / calico-istio-alp-ai-agent-guide.md
Created December 6, 2025 15:39
Calico + Istio App Layer Policy Setup - AI Agent Execution Guide

Calico + Istio App Layer Policy Setup - AI Agent Execution Guide

Target: AI code agents (Claude Code, GitHub Copilot Workspace, etc.) Audience: Automated execution systems Cluster Requirements: Kubernetes cluster with Calico CNI installed


Execution Prerequisites Check

@electricjesus
electricjesus / calico-istio-alp-docs-updated.md
Last active December 6, 2025 15:22
Updated Calico + Istio App Layer Policy Documentation (with Istio 1.28 + IstioOperator)

Enforce Calico network policy for Istio service mesh

Overview

You can enforce Calico network policy for Istio application layer policy using the Dikastes sidecar. Dikastes enables Calico to integrate with Istio's Envoy proxy to enforce fine-grained Layer 7 (HTTP) policies.

Value

  • Pod traffic controls for Istio-enabled apps: Lets you restrict ingress traffic inside and outside pods and mitigate common threats to Istio-enabled apps.
  • Security alignment with zero trust: Supports zero-trust network models through traffic encryption, multiple enforcement points, and multiple identity criteria for authentication.
@electricjesus
electricjesus / calico-istio-alp-guide.md
Last active December 6, 2025 15:11
Calico + Istio 1.28 App Layer Policy Setup Guide (IstioOperator approach)

Calico + Istio 1.28 App Layer Policy - Step-by-Step Guide

This guide shows how to set up Calico Application Layer Policy (ALP) with Istio 1.28 using the modern IstioOperator approach.

Prerequisites

  • Kubernetes cluster (1.29+)
  • Calico 3.31.1 installed
  • Istio 1.28.1 installed
  • kubectl and istioctl CLI tools

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
@electricjesus
electricjesus / $README.md
Last active November 9, 2023 11:27
Calico Application Layer Policy via Istio Helm Install

Calico Application Layer Policy via Helm

  1. follow install steps here, EXCEPT the Install Istio part.

  2. install istio-base via helm

    • kubectl create ns istio-system
    • helm install istio-base istio/base -n istio-system --wait

    and then choose one of the below options (marked with OPTION)

/* Functional Programming 101
1.) Create a function 'last' that has the following use cases:
- last("abc") // --> outputs "c"
- last(1,2,3,"D") // --> outputs "D"
- last([1,2,3,4]) // --> outputs 4
@electricjesus
electricjesus / test.php
Created December 17, 2014 06:11
Script to test for server uptime [Magento]
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Content-type: application/json");
require_once "app/Mage.php";
Mage::app($_SERVER['MAGE_RUN_CODE'], $_SERVER['MAGE_RUN_TYPE']);
$resource = Mage::getSingleton('core/resource');
// Level 1 mission
// The code does not execute properly. Try to figure out why.
function multiply(a, b){
a * b
}
// Level 2 mission
//2. Correct this code, so that the greet function returns the expected value.
@electricjesus
electricjesus / cc-verification.js
Created August 13, 2014 09:17
getCreditCardType
// automatic creditcard detection @Seth Malaki `Electric Jesus` (c) 2012
// returns credit type on success. returns null if either unsupported or fails checksum validation (Luhn algorithm).
function getCreditCardType(accountNumber, doVerify)
{
var typeKey = null;
// inspect account number, no dashes
var creditCardInspectors = {
VI : /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/, // Visa
MC : /^5[1-5][0-9]{14}$/, // Mastercard
@electricjesus
electricjesus / nginx.conf
Created May 8, 2014 06:09
NGINX Meteor with Websockets
# we're in the http context here
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# the Meteor / Node.js app server
server {
server_name yourdomain.com;