Skip to content

Instantly share code, notes, and snippets.

View abdallah's full-sized avatar
🏠
Working from home

Abdallah Deeb abdallah

🏠
Working from home
View GitHub Profile
@abdallah
abdallah / SKILL.md
Created April 4, 2026 14:27
Mattermost skill for OpenClaw agents — send/read messages, channels, DMs, search
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 2 column 223
---
name: mattermost
description: Send and read messages on a self-hosted Mattermost instance via API. Use when sending messages to channels or DMs, reading posts, searching messages, listing channels, or any Mattermost operations. Triggers on: Mattermost, MM, send message to team, post to channel, read Mattermost, DM on Mattermost, check Mattermost.
---

Mattermost

Config

Set these in your TOOLS.md or environment:

@abdallah
abdallah / SKILL.md
Created April 4, 2026 14:27
GitLab skill for OpenClaw agents — self-hosted or gitlab.com, MRs, CI, issues, files
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 2 column 257
---
name: gitlab
description: Interact with a self-hosted or cloud GitLab instance via API. Use when checking MRs (merge requests), CI pipeline status, issues, comments, file contents, or any GitLab operations. Works with both self-hosted GitLab and gitlab.com. Triggers on: MR, merge request, pipeline, CI, GitLab issue, GitLab review, open MR, check CI, list MRs.
---

GitLab

Config

Set these in your TOOLS.md or environment:

@abdallah
abdallah / SKILL.md
Last active March 30, 2026 15:31
Kiro CLI auth helper scripts — check token status and re-authenticate without a browser on headless servers
name kiro-auth
description Check and fix Kiro CLI authentication. Use when Kiro fails to start with 'You are not logged in', prompts for browser login, or sessions keep expiring. Triggers on phrases like "kiro auth", "kiro login", "kiro expired", "re-auth kiro", "kiro not working".

Kiro Auth

Kiro CLI uses AWS Cognito DeviceCode OAuth. Auth tokens live in ~/.aws/sso/cache/device-sso-lsp-token.json.

Check Auth Status

@abdallah
abdallah / SKILL.md
Created March 27, 2026 08:50
solar_check.py — Check Felicity Solar inverter and battery status
name solar-check
description Check the state of solar system — inverter status, PV output, battery SOC/SOH, and energy totals via the Felicity Solar Shine API. Use when asked about solar panels, inverter, batteries, power output, energy today/month/year, battery charge level, or any solar system status. Triggers on phrases like "check solar", "solar status", "battery level", "inverter", "how much power", "solar panels".

Solar Check

@abdallah
abdallah / check_tgs_cidr.py
Created July 1, 2025 10:14
AWS Transit Gateway CIDR Route Checker
#!/usr/bin/env python3
"""
AWS Transit Gateway CIDR Route Checker
This script checks if a specific CIDR block exists in an AWS Transit Gateway route table
and provides information about the associated account and attachment.
Requirements:
- boto3 (latest version)
- AWS CLI configured with appropriate profiles
#!/bin/bash
######## Source ################################################################
#
# enhanced version of https://github.com/qoomon/aws-ssm-ec2-proxy-command
#
######## Usage #################################################################
# https://github.com/qoomon/aws-ssm-ec2-proxy-command/blob/master/README.md
#
# Install Proxy Command
# - Move this script to ~/.ssh/aws-ssm-ec2-proxy-command.sh
@abdallah
abdallah / on_asp_change.sh
Last active October 22, 2024 08:29
Zsh hook to check AWS account on profile change
# Add to ~/.zshrc
# https://github.com/rothgar/mastering-zsh/blob/master/docs/config/hooks.md
# precmd is executed before your prompt is displayed and is often used to set values in your $PROMPT. preexec is executed between when you press enter on a command prompt but before the command is executed
precmd() {
if [[ $CURRENT_PROFILE != "$AWS_PROFILE" ]]; then
echo changed, checking sts;
export CURRENT_PROFILE=$AWS_PROFILE;
if ! aws sts get-caller-identity; then
aws sso login
@abdallah
abdallah / update_newrelic_whitelist.py
Created March 13, 2020 09:58
Lambda function to update whitelist with newrelic IPs
import os
import json
import boto3
import urllib3
# Set the following in the Lambda Environment variables
IP_SET_ID = os.environ.get('IP_SET_ID')
Special_IPs = os.environ.get('SPECIAL_IPS').split(',')
@abdallah
abdallah / create-acm-cert.yml
Created March 11, 2020 07:54
Create an Amazon issued certificate in ACM. Uses Route53 for DNS verification
- hosts: localhost
gather_facts: no
vars:
aws_profile: "aws_account_name"
acm_domain: "example.com"
acm_extra_domains: "*.example.com"
acm_idempotency_token: "examplecomtoken"
dns_zone: "example.com"
environment:
AWS_PROFILE: "{{ aws_profile }}"
@abdallah
abdallah / ses-sns-sqs-to-graylog.py
Created March 8, 2018 14:08
Send SNS notifications to Graylog2
import boto3
import json
import requests
from datetime import datetime
import sys
HOST = 'MY.HOST.ADDRESS'
PORT = 12201 # change if you create graylog input with different port
queue_url = 'https://sqs.ZONE.amazonaws.com/ACCOUNT/QUEUENAME'