Skip to content

Instantly share code, notes, and snippets.

View lucasmz-dev's full-sized avatar
👋
Probably on @signalapp

Lucas lucasmz-dev

👋
Probably on @signalapp
View GitHub Profile
@lucasmz-dev
lucasmz-dev / fedora_android-tools-udev-rules.md
Last active June 7, 2024 22:56
Installing android-tools in Fedora

How to properly install android-tools in Fedora

Currently, it seems as if Fedora doesn't install udev-rules, to get this working, I've had to manually install them from a community project. I'm not very knowledgable in Linux, these are just the steps I had to do to get things working that I'd like to document.

Install android-tools

Install android-tools from DNF.

sudo dnf install android-tools
@lucasmz-dev
lucasmz-dev / calyxos_motog3-52s_return-to-stock.md
Last active June 30, 2024 04:30
How to return back to stock software in Motorola devices on Linux

I am not responsible for any type of damage when you follow this tutorial. You have been warned.

This tutorial is meant for the devices: Moto G32, G42, and G52.

Device codenames

It is important to note that these devices are usually referenced using codenames in multiple places, it is important to know which one is yours.

  • G32: devon
  • G42: hawao
@lucasmz-dev
lucasmz-dev / 8907XX-SW-MAIN-XX6500SS5300S615-VS.367_USB.md
Last active June 1, 2024 00:28
Atualização TCL S6500 32" V367 em protocolo BitTorrent (em forma de torrent) para maior velocidade e arquivamento
@lucasmz-dev
lucasmz-dev / fixing_bluetooth_clipping.md
Last active December 17, 2021 19:07
Fixing Bluetooth earphones audio clipping on TVs (and other devices, phones, tablets...)

You might have bought Bluetooth earphones, and while they might work on your modern phone, they seem to not work properly on your TV... or older phone... or any other Bluetooth transmitting device!

I bought Redmi Airdots 1 year ago, and while it would work just fine on my phone, it would have clipping with my TV, so I wasn't able to watch VSauce on it.

A while after, I would notice not-so-modern phones would have the same issue.

Cause

@lucasmz-dev
lucasmz-dev / ExitThread.luau
Last active December 2, 2021 00:30
Exit implementation in Luau (task. required)
--[=[
A function which makes it so that the current thread is interrupted, and causes an error when on an attempt to resume it.
@yields
]=]
local function exit()
task.defer(
coroutine.close,
coroutine.running()
)
@lucasmz-dev
lucasmz-dev / SimpleSignal.lua
Created November 20, 2021 00:33
SimpleSignal
export type ScriptSignal = {
_active: boolean,
_head: ScriptConnection?,
IsActive: (ScriptSignal) -> boolean,
Connect: (
ScriptSignal,
handler: (...any) -> ()
) -> ScriptConnection,
Wait: (ScriptSignal) -> (...any),
@lucasmz-dev
lucasmz-dev / BindToClose.lua
Last active November 16, 2021 02:53
Proper BindToClose implementation
--[[
A custom BindToClose implementation which fixes these issues:
* Has a :Disconnect method
* Listeners run in a different order:
Which is: First connected -> Last connected
This order fixes a lot of hidden issues, particularly with requiring.
]]

Github Two-Factor Authentication (2FA) for Brazil via SMS

The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console. The option Brazil +55 will be the first on the list, already selected:


🇧🇷 [pt-BR]

Autenticação em dois fatores (2FA) do GitHub para o Brasil via SMS

@lucasmz-dev
lucasmz-dev / Yielder.lua
Last active October 14, 2021 15:32
Yielder (nicer way to do custom resuming)
local Yielder = {}
Yielder.__index = Yielder
function Yielder.new(): Class
return setmetatable({
_thread = nil
}, Yielder)
end
function Yielder:Yield(...): (...any)