Skip to content

Instantly share code, notes, and snippets.

View TrianguloY's full-sized avatar
👨‍💻
Enjoying scripting

TrianguloY TrianguloY

👨‍💻
Enjoying scripting
View GitHub Profile
@TrianguloY
TrianguloY / Userscript utils.md
Last active May 8, 2025 09:24
Userscripts utils

Userscript utils

Personal collections of methods for userscripts, that may be useful for someone else...

@TrianguloY
TrianguloY / Readme.md
Last active September 8, 2023 08:49
Test: Java Builder with mandatory parameters

Java Builder with mandatory parameters

Test to check how to construct a builder with mandatory parameters.

Pros:

  • Same api as any standard builder (like Lombok)
  • Will Throw a compilation error if there is a missing field.
  • The compiled code (after Java's type erasure) is basically identical to a normal builder.

Cons:

@TrianguloY
TrianguloY / 0.README.md
Last active November 27, 2022 23:13
Lightning Launcher script collection

These are all the scripts that I still keep on my phone for Lightning launcher (the best Android launcher ever).

If you have never heard or used this launcher, these will be useless.

If you have, and you remember me, these may look fun to check and see what crazy shenanigans I never published on the wiki.

In any case I decided to post them here for preservation. I had very little experience, I apologize for the 'unusual' style of programming.

They are unedited, shown here without any modification, they may or may not work wihout minimal tweaks.

@TrianguloY
TrianguloY / AndroidManifest.xml
Last active October 31, 2021 10:55
A simple queries replacement for Android API 30+ where package discovery is restricted.
<!--
As of API 30+ package discovery is restricted, and you can't even open an url: https://developer.android.com/training/basics/intents/package-visibility#intent-signature
A queries tag with description of what intents you use is required, but if you don't want to be bothered this is a simple alternative.
This is valid queries tag that will return all packages with at least one intent. Some internal device packages won't be returned, but probably you didn't want them anyway. All the functionality from pre29 should be restored.
-->
<queries>
<intent>
<action android:name="*" />
</intent>
</queries>
@TrianguloY
TrianguloY / Bookmarklets.md
Last active May 20, 2022 16:49
Collection of bookmarklets (bookmarks that run code) with various features

Installation: create a bookmark with the specified url.

Popup

Opens the current page in a popup (a window without most of the browser bars). Specially usefull when you need to make a screenshot or share it live without showing your bookmarks or extensions installed.

javascript:void(window.open(window.location.href,'', 'toolbar=no'));

@TrianguloY
TrianguloY / Get unique color from string (python)
Last active April 9, 2020 15:06
Returns an int color from a string. Same strings will return same colors, different strings will return different colors ('randomly' different). Internal: string =md5(x)=> hex =x/maxhex=> float [0-1] =hsv_to_rgb(x,1,1)=> rgb =rgb_to_int=> int
import colorsys
import hashlib
def uniqueColor(string):
"""
Returns a color from the string.
Same strings will return same colors, different strings will return different colors ('randomly' different)
Internal: string =md5(x)=> hex =x/maxhex=> float [0-1] =hsv_to_rgb(x,1,1)=> rgb =rgb_to_int=> int
:param string: input string

Discord bot that will reply to messages that ends in one of the specific phrases of the minigame 'Fan Club' from Rythm heaven from Nintendo (https://rhythmheaven.fandom.com/wiki/Fan_Club)

Both english and spanish phrases are included, but other languajes (or any phrase) can be entered.

For example, any message that ends with ...yeah yeah yeah will be followed by the reply:

HEY HEY HEY HEY

👏🏽👏🏽👏🏽👏🏽