Skip to content

Instantly share code, notes, and snippets.

View gitpro2005's full-sized avatar

gitpro2005

  • Brazil
View GitHub Profile
@gitpro2005
gitpro2005 / Set Variable Dialog Action.java
Created May 1, 2026 05:43
MacroDroid - Set Variable Dialog Action - Paste in the Java Code action. Works flawlessly, uses a native dialog.
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.text.InputType;
import android.text.TextWatcher;
import android.text.Editable;
@gitpro2005
gitpro2005 / Edge NTP Cleanup (bookmarklet).txt
Last active November 9, 2024 21:38
Remove the new MSN logo (or the old MS start one), and also the annoying "rewards" and "link phone" icons. *HOW TO USE*: Set the home page button to custom URL, and put the bookmarklet. It will normally redirect to the new tab page, and if already there, apply the cleanup.
javascript:(function()%7Bclass%20NTPCleanupManager%20%7B%0A%20%20static%20STRUCTURE%20%3D%20%7B%0A%20%20%20%20%22float-button-group%22%3A%20%7B%0A%20%20%20%20%20%20wallpaperFloatingButtons%3A%20%22.container%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22cs-header-core%22%3A%20%7B%0A%20%20%20%20%20%20annoying%3A%20%5B%0A%20%20%20%20%20%20%20%20%22mobile-app-upsell%22%2C%0A%20%20%20%20%20%20%20%20%22ms-rewards%22%2C%0A%20%20%20%20%20%20%20%20%22%23microsoftBrandingHolder%22%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%22common-search-box-edgenext%22%3A%20%7B%0A%20%20%20%20%20%20%20%20searchBox%3A%20%22cs-common-search-box%22%2C%0A%20%20%20%20%20%20%20%20%22codex-bing-chat%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20copilotButton%3A%20%22.cbb-container%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20constructor()%20%7B%0A%20%20%20%20this.elements%20%3D%20%7B%7D%3B%0A%20%20%20%20this.baseElement%20%3D%20document.querySelector('edge-chromium-page')%3B%0A%20%20%20%
@gitpro2005
gitpro2005 / ChatGPT - Force GPT-4o-mini on new chats.js
Last active October 1, 2024 01:42
Inspired by an idea on Reddit, it overrides API responses, to change the model to be used in new chats. Useful when you don't want to consume your GPT-4o quota with less elaborated questions, as ChatGPT doesn't let you change the model, because it wants you to exceed the free trial so you will want to buy it. https://www.reddit.com/r/ChatGPT/com…
// ==UserScript==
// @name Force GPT-4o Mini
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Override model selection to use only GPT-4o mini
// @match https://chatgpt.com/*
// @grant none
// ==/UserScript==
(function() {