Skip to content

Instantly share code, notes, and snippets.

@joerodgers
joerodgers / Get-ApplicationsWithCertOrSecretExpirations.ps1
Last active June 12, 2025 11:04
Gets all Azure AD Applications that have client secrets or certificates expiring on or before the provided expiration date.
#requires -Modules Microsoft.Graph.Authentication
function Get-ApplicationWithExpiratingClientSecret
{
[CmdletBinding()]
param
(
[parameter(Mandatory=$true)]
[DateTime]$ExpiresOnOrBefore
)

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@pkazi
pkazi / cloudTrailEventNames.list
Last active June 12, 2025 11:02
List of values for parameter EventName in AWS Cloudtrail events
AbortDocumentVersionUpload
AbortEnvironmentUpdate
AbortMultipartUpload
AbortVaultLock
AcceptAccountMapping
AcceptCertificateTransfer
AcceptDelegate
AcceptDirectConnectGatewayAssociationProposal
AcceptFxPaymentCurrencyTermsAndConditions
AcceptHandshake
@boxabirds
boxabirds / .cursorrules
Last active June 12, 2025 11:00
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 12, 2025 11:00
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@moskomule
moskomule / tinyimagenet.sh
Created November 6, 2017 10:48
tiny imagenet downloader
#!/bin/bash
# download and unzip dataset
#wget http://cs231n.stanford.edu/tiny-imagenet-200.zip
unzip tiny-imagenet-200.zip
current="$(pwd)/tiny-imagenet-200"
# training data
cd $current/train
@welenofsky
welenofsky / fail2ban-wordpress.md
Created October 18, 2019 04:24
Basic Wordpress Fail2Ban Filter (Debian/Ubuntu Apache2)

Blocking WP Login brute forcing

This guide will tell you how to setup a custom fail2ban filter and jail to watch the Apache access log and ban malicious attackers who brute for wp-login.php. I am sure we have all seen it in our access logs. I would say it the most common thing I see in wordpress and non wordpress sites access logs that stands out as a blind brute force. Im tired of it. So I found out how to ban them.

Install fail2ban using apt

# apt install fail2ban

Create wordpress filter

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Orb | Render a custom-styled graph</title>
<script src="https://unpkg.com/@memgraph/[email protected]/dist/browser/orb.js"></script>
<style>
html, body {
height: 100%;
margin: 0;
@tonilastre
tonilastre / memgraph-graph-browser-connection.html
Last active June 12, 2025 10:57
Run Cypher queries from browser and visualize graph results with Memgraph Orb
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Javascript Browser Example | Memgraph</title>
<script src="https://cdn.jsdelivr.net/npm/neo4j-driver"></script>
<script src="https://unpkg.com/@memgraph/orb/dist/browser/orb.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Mono&display=swap" rel="stylesheet">

Orchestrator

Split complex tasks into sequential steps, where each step can contain multiple parallel subtasks.

Process

  1. Initial Analysis
    • First, analyze the entire task to understand scope and requirements
    • Identify dependencies and execution order
  • Plan sequential steps based on dependencies