Skip to content

Instantly share code, notes, and snippets.

View workatease's full-sized avatar
😄

Pyll Gomez workatease

😄
View GitHub Profile
@workatease
workatease / k8s-jprofiler-attach.sh
Created July 1, 2025 06:13 — forked from adiii717/k8s-jprofiler-attach.sh
Attach JProfiler agent to a JVM running in a Kubernetes pod
#!/bin/bash
set -ex
usage()
{
echo "usage: k8s-jprofiler-attach.sh pod_name"
}
k8s_jvm_pod="${1}"
@workatease
workatease / index.js
Last active May 4, 2025 20:56
directus - Google reCaptcha v2 using auth.login.before api hook for validation for custom login
// extensions/hooks/google-recaptcha-v2/index.js
module.exports = function registerHook({ env, exceptions }) {
const querystring = require("querystring");
const axios = require("axios");
const { BaseException } = exceptions;
const VERIFY_ENDPOINT = "https://www.google.com/recaptcha/api/siteverify";
return {
"auth.login.before": async function (input) {
const captcha = input["g-recaptcha-response"];
if (captcha) {