Skip to content

Instantly share code, notes, and snippets.

View xinity's full-sized avatar

Rachid Zarouali xinity

View GitHub Profile
@dreamorosi
dreamorosi / README.md
Created April 6, 2025 17:17
A super-basic MCP Server hosted on AWS Lambda

To deploy, create a Lambda function and enable function URL (no auth - yolo), then use the handler above in your function. That same implementation will also work with API Gateway HTTP (aka v2), if you want to use ALB or API Gateway REST (aka v1) you should swap the schema used for parsing.

Then you can test using a POST request with this body:

{
  "jsonrpc": "2.0",
  "method": "tools/list",
  "id": 2
}
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then

Talos

cat << EOF > patch.yaml
cluster:
  proxy:
    disabled: true
  network:
    cni:
      name: none
@tormath1
tormath1 / README.md
Last active August 29, 2024 12:41
Cluster API OpenStack using Flatcar
@noperator
noperator / log4j.md
Last active December 29, 2021 09:41
Emerging threat details on CVE-2021-44228 in Apache Log4j

Update: Please see Bishop Fox's rapid response post Log4j Vulnerability: Impact Analysis for latest updates about this vulnerability.

Technologies using Apache Log4j

The Cosmos 🌌 team at Bishop Fox 🦊 is currently researching open-source projects that appear to use Log4j by default.

  • Apache Druid
  • Apache Dubbo
  • Apache Flink
  • Apache Flume
@byt3bl33d3r
byt3bl33d3r / log4j_rce_check.py
Created December 10, 2021 06:02
Python script to detect if an HTTP server is potentially vulnerable to the log4j 0day RCE (https://www.lunasec.io/docs/blog/log4j-zero-day/)
#! /usr/bin/env python3
'''
Needs Requests (pip3 install requests)
Author: Marcello Salvati, Twitter: @byt3bl33d3r
License: DWTFUWANTWTL (Do What Ever the Fuck You Want With This License)
This should allow you to detect if something is potentially exploitable to the log4j 0day dropped on December 9th 2021.
@bgarcial
bgarcial / Makefile
Last active April 4, 2023 15:14
Steps/actions needed to be done to deploy loki logging backend on staging aks cluster.
loki-install:
sh ./variables.sh
sh ./setup-loki-fluentbit.sh
@strund3r
strund3r / csgo.ps1
Last active March 23, 2022 22:17
Start CSGO and Aurora
$Principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
# Add log color command to clipboard
Set-Clipboard -Value "log_color General FFD700FF; cl_showpos 1"
# Start CSGO
(New-Object -Com Shell.Application).Open("steam://rungameid/730")
Start-Sleep 10
@abdennour
abdennour / vault-auth-k8s-method.sh
Last active April 7, 2025 17:29
Vault - Enable Kubernetes Auth Method
# $1: vault namespace
# $2: Vault Token Reviewer Service Account
vault_namespace=${1:-"vault"}
token_reviewer_sa=${2:-"vault"}
if [ -z "${VAULT_TOKEN}" ] || [ -z "${VAULT_ADDR}" ]; then
echo "ERROR: VAULT_TOKEN and VAULT_ADDR env vars are required"
exit 404
fi
cat <<EOF | kubectl apply -f -
@colorchestra
colorchestra / get-gitlab-user-id-by-name.sh
Created August 2, 2019 16:05
Uses the Gitlab API and jq to get the Gitlab User ID by supplying the username.
#!/bin/bash
# requires curl and jq
# assumes usage of Gitlab API v4
# hella hacky
url="https://git.example.net"
token="abcdefghijklmnop"
username="$1"
# output is always paginated - get total number of pages from http header