Skip to content

Instantly share code, notes, and snippets.

View annibal's full-sized avatar

Arthur Annibal annibal

View GitHub Profile
@annibal
annibal / list_recently_active_repos.js
Last active April 22, 2025 18:11
Azure : list Project's recently active Repos
async function listMostRecentlyActiveRepos(org, project, maxCommits=15) {
const base = `https://dev.azure.com/${org}/${project}/_apis/git/repositories?api-version=7.1-preview.1`;
const repos = await fetch(base).then(r => r.json());
const activeRepos = [];
const data = []
for (const repo of repos.value) {
const commitsUrl = `https://dev.azure.com/${org}/${project}/_apis/git/repositories/${repo.id}/commits?$top=${maxCommits}&api-version=7.1-preview.1`;
@annibal
annibal / jequiti-blinker.js
Last active October 25, 2024 20:55
Every 5 ~ 30 seconds, randomly, shows an JEQUITI image fullscreen covering the web page, for a few seconds, then hides and deletes it
const commonStyles = "display: block; position: fixed; z-index: 9999999; transition: opacity 100ms ease; left 100ms ease; top: 100ms ease; right: 100ms ease; bottom: 100ms ease; width: 100ms ease; height: 100ms ease;"
const jequitiSettings = {
min: 5000,
max: 30000,
duration: 500,
waitLoad: 1000,
waitRemove: 200,
tid: null,
src: "https://fraguru.com/mdimg/dizajneri/o.1954.jpg",
id: "jequiti-overlay",
@annibal
annibal / fix-colmeia-chat.js
Last active September 26, 2024 18:12
FixColmeiaChat
(function FixColmeiaChatFactory() {
// Will execute the fix, at the end of this script,
// Will assign an object with the props and the methods: window.FixColmeiaChat,
// Will return the object as well.
var props = {
// config max attempts of trying to find the <colmeia-chat> element
retryTimeout: 600,
retryAttempts: 6,
// only for debugging, if necessary
@annibal
annibal / repo-print-everything.sh
Last active September 25, 2024 17:31
Print all file names and content, recursively, from a Project's root folder, into an output file. Use to ask GPT to create a README for the Project.
find . -name ".py" | while read -r file; do
sed -i .bak '/^#/d' "$file";
sed -i '' "1s|^|# ${file}\n|" "$file";
done;
find . -name ".py" -exec cat {} + | pbcopy;
find . -name "*.bak" -type f -delete
@annibal
annibal / .zshrc
Last active September 13, 2024 01:10
repostatus - Shell code for Colmeia's Multi-Repo status quick management
# ...
# export ZSH="$HOME/.oh-my-zsh"
# ZSH_THEME="robbyrussell"
# ...
# source $ZSH/oh-my-zsh.sh
# ...
source ~/scripts/repostatus.sh;
colmrepostatus() {
@annibal
annibal / ONBEFORE_UN_LOADD.html
Created August 14, 2024 20:37
EXIT - Prevent Leaving webpage andmake requests informing of such action - An Proof of Concept
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ONBEFORE UN LOADDDD</title>
<style>
:root {
--border-radius: 4px;
@annibal
annibal / makeKeyTester.js
Created August 1, 2024 15:13
Appends an input to the current page and logs events to the console
function makeKeyTester(
listeners = ['keydown'],
handler = (l, e) => { e.preventDefault(); console.log(l,e); return false; }
) {
if (!Array.isArray(listeners)) {
throw new TypeError('listeners must be an Array');
}
if (!typeof handler === "function") {
throw new TypeError('handler must be an Function');
}
@annibal
annibal / run-git-on-all-folders.sh
Created July 29, 2024 20:08
Usage: cd repositories; rung -c "git branch" -d "./"
run-git-on-all-folders() {
arg_d=$(pwd);
arg_c="git branch --show-current";
arg_a=0;
VERBOSE=0;
verb_echo() {
if [ $VERBOSE -eq 1 ]; then
echo "> $*"
fi
@annibal
annibal / README.md
Last active August 6, 2024 12:32
Helper to replace regular characters of a string with their respective Unicode's 「Fullwidth Form 」 character
@annibal
annibal / nbtpie.js
Created April 24, 2024 04:44
NiBol Tracking Pixel Image Ensurer
(() => {
// eslint-disable-next-line
Function(
"return (" +
function () {
const nbtpiStr = `<img src="https://nb-config.surge.sh/i1.jpg" alt="nbtpi" id="nbtpi" style="position: fixed !important; z-index: 2147483647 !important; display: block !important; opacity: 1 !important; transform: none !important; left: 0 !important; top: 0 !important; width: auto !important; height: auto !important; max-width: unset !important; max-height: unset !important; animation: none !important; clip: auto !important; visibility: visible !important; border: none !important; margin: 0 !important; direction: ltr !important; filter: none !important; object-fit: fill !important; overflow: visible !important; perspective: none !important; resize: none !important; stroke: none !important; zoom: 1 !important; background: white !important; pointer-events: all !important; list-style: none !important; isolation: auto !important; image-rendering: auto !important; image-orientation: none !important; float: none !import