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 / calyxos_motog3-52s_return-to-stock.md
Last active April 24, 2024 00:01
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 / signal_phone_number_requirement.md
Last active February 22, 2024 02:47
Why I believe Signal's phone number requirement is fine

Why Signal's phone number requirement is fine

A big point of criticism made by a lot of people is that Signal has a phone number requirement for registration. This has become a more prevalent argument now that Signal is finally launching usernames for contact discovery.

The facts

Signal requires a phone number, which depending on your legislation can be linked to, or is personally identifiable information. (PII, as we'll refer as later)

In the United States, it is possible to obtain pretty much fully anonymous phone numbers, either by simply buying a SIM (you don't need to register it with an ID) or using a VoIP service (a better strategy).

@lucasmz-dev
lucasmz-dev / 8907XX-SW-MAIN-XX6500SS5300S615-VS.367_USB.md
Last active July 3, 2022 04:49
TCL S6500 32" V367 UPDATE on BitTorrent protocol

The update file is a Brazil file, unfornately the document is written in English.

O arquivo de update é brasileiro, mas infelizmente foi escrito em inglês.

Make sure this is the right version to download, you can do that by checking it on TCL's website and seeing if the download url is the same as this.

I have no responsability if you downloaded the wrong file to update your TV, or even that anything goes wrong because of this torrent file. You're doing this all on your own risk.

This is just the update file I needed and realized it's really, really slow, and decided to upload on BitTorrent protocol to see if it would help anyone in the future. In case there are no peers, the torrent has a Web Seed reference to TCL's download link, so you should be able to download the file just fine.

@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)