Skip to content

Instantly share code, notes, and snippets.

View dserodio's full-sized avatar
🐕

Daniel Serodio dserodio

🐕
View GitHub Profile
external-ingress-nginx-controller-7bdd788fdb-vb82l controller 207.248.21.184 - - [23/Dec/2024:23:55:23 +0000] "GET /api/trpc/installments.getInstallments366?input=%7B%22json%22%3A%7B%22impersonatedTaxId%22%3Anull%7D%2C%22meta%22%3A%7B%22values%22%3A%7B%22impersonatedTaxId%22%3A%5B%22undefined%22%5D%7D%7D%7D HTTP/1.1" 200 37747 "https://meu.olaisaac.io/home?tab=paid" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36" 3556 0.296 [rf-monorepo-meu-isaac-meu-isaac-80] [] 10.22.26.193:8080 37678 0.296 200 5403e03eaf34fb290133a78c7024bd52
external-ingress-nginx-controller-7bdd788fdb-gzjql controller 187.95.31.42 - - [23/Dec/2024:23:55:23 +0000] "GET /api/trpc/installments.getInstallments366?input=%7B%22json%22%3A%7B%22impersonatedTaxId%22%3Anull%7D%2C%22meta%22%3A%7B%22values%22%3A%7B%22impersonatedTaxId%22%3A%5B%22undefined%22%5D%7D%7D%7D HTTP/1.1" 200 155334 "https://meu.olaisaac.io/home" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (K
❯ stern -n ingress-controllers 'pod/external-.*' --tail 0 | egrep 'installments.getInstallments366'
+ external-ingress-nginx-controller-7bdd788fdb-gzjql › controller
+ external-ingress-nginx-controller-7bdd788fdb-lk4ws › controller
+ external-ingress-nginx-controller-7bdd788fdb-vb82l › controller
+ external-ingress-nginx-defaultbackend-5989789bcb-mvhzb › ingress-nginx-default-backend
external-ingress-nginx-controller-7bdd788fdb-gzjql controller 207.248.21.184 - - [23/Dec/2024:23:44:35 +0000] "GET /api/trpc/installments.getInstallments366?input=%7B%22json%22%3A%7B%22impersonatedTaxId%22%3Anull%7D%2C%22meta%22%3A%7B%22values%22%3A%7B%22impersonatedTaxId%22%3A%5B%22undefined%22%5D%7D%7D%7D HTTP/1.1" 200 37754 "https://meu.olaisaac.io/home?utm_source=sortinghat&utm_medium=email%2Fsms&utm_campaign=primeiro-acesso" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36" 2331 0.271 [rf-monorepo-meu-isaac-meu-isaac-80] [] 10.22.26.193:8080 37678 0.271 200 5b0e
@dserodio
dserodio / enable-manifest-v2.sh
Created August 22, 2024 13:35
Enable support for Manifest v2 extensions in Chromium-based browsers for uBlock Origin
defaults write com.google.Chrome.plist ExtensionManifestV2Availability -int 2
defaults write com.brave.Browser.plist ExtensionManifestV2Availability -int 2
defaults write company.thebrowser.Browser.plist ExtensionManifestV2Availability -int 2
#!/bin/bash
if type "pkgx" &> /dev/null; then
echo "pkgx is already installed"
eval "$(pkgx --shellcode)"
else
echo "installing pkgx"
eval "$(curl -Ssf https://pkgx.sh)"
fi
@dserodio
dserodio / zsh-completion.md
Created April 22, 2024 20:38
Zsh Completions

zsh completion

How to look up completion definitions

The name of the completion function for the command foo is $_comps[foo].

To see the code of a function myfunc, run echo -E $functions[myfunc], or just echo $functions[myfunc] if you have the bsd_echo option on, or print -rl $functions[myfunc]. So to see the code of the completion function for the command foo, run echo -E $functions[$_comps[foo]]. Alternatively, run which $_comps[foo] if the function name has no alias.

This shows the code without comments (and with normalized whitespace: it's a human-readable dump of the bytecode that zsh stores internally). If you want to see the original file defined in the code, run **[whence -v $_comps[foo]](http://zsh.sourceforge.net/Doc/Release/Shell-Buil

@dserodio
dserodio / 0_Toggle Airport
Last active April 3, 2024 12:50 — forked from coltenkrauter/README.md
Toggle Airport: Disable Wi-Fi when connected to ethernet
Empty file to change the gist title
@dserodio
dserodio / Thayer.itermcolors
Created April 2, 2024 11:56
Thayer color theme for iTerm2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.11575811356306076</real>
@dserodio
dserodio / Docker snippets.md
Created February 14, 2024 21:11
Docker snippets

Misc. Docker snippets

Build multi-platform image

  1. Setup builx builder:
docker buildx create --name ourbuilder
docker buildx use ourbuilder
@dserodio
dserodio / openai.py
Created May 15, 2023 14:33
OpenAI bolierplate
# Boilerplate for Python apps using OpenAI API.
# From DeepLearning.ai's "ChatGPT Prompt Engineering for Developers" mini-course
# First, these dependencies need to be installed:
#
# pip install openai python-dotenv
import openai
import os
@dserodio
dserodio / get_approvers_count.py
Created March 14, 2023 13:03
Get the number of approvers in a given Github repository's PRs
import requests
# Set the repo owner and name
owner = "YOUR_REPO_OWNER"
repo = "YOUR_REPO_NAME"
GITHUB_TOKEN = "YOUR_GITHUB_TOKEN"
# Set the GitHub API URL
url = f"https://api.github.com/repos/{owner}/{repo}/pulls"