Skip to content

Instantly share code, notes, and snippets.

View lvctr's full-sized avatar
💫

alvi kazi lvctr

💫
View GitHub Profile
@lvctr
lvctr / judlyn_rescue.md
Last active April 30, 2022 10:19
How to rescue your bootlooping LG G7

Didn't bother to read documentation and ended up bootlooping your LG G7 trying to flash roms?

Since LG engineers decided it would be a good idea to not include a key combination for emergency shutdown and instead reboots your device every time you soft or hard reset, here are a couple undocumented key combinations you can use to rescue your bootlooping LG G7.

Booting into Bootloader

The usual method to boot into bootloader is to insert a USB connected to your computer while holding down the Volume Down key on your powered off LG G7. But you can't power down your phone while it's bootlooping.

Instead, you can:

@lvctr
lvctr / pepper-tickle-issues-ja.md
Last active April 30, 2022 10:17
pepper-tickle-issues-ja.md

pepper-tickleの移植にあたって直面した問題

Pepperくすぐりアプリを昔のPythonベースからAndroid/Javaへ移植しようとしてた時、非同期的にSayアクションの処理の実装にあたって複数の問題に直面しました。

Futureに関する混乱

Futureとは、ある処理を非同期的に包むオブジェクトであり、利用すると非同期的処理を手続き型に表せるようになります。

Pepper APIの公式ドキュメンテーションだと、複数のFutureを一つのメソッドに利用すればアクションをチェーンすることができるという例はたくさんありますが、pepper-tickleの場合だと、同じFutureを複数のメソッドに利用せざるをえなくて、Atomic変数を使用することにしました。

@lvctr
lvctr / pepper-tickle-issues.md
Last active April 30, 2022 10:17
Issues faced while porting pepper-tickle

Problems faced during porting of app pepper-tickle

While porting the Pepper Tickling app from the old Python base to the new Android/Java base, I faced a big problem trying to handle the same Say action amongst multiple asynchronous methods.

Confusion in regards to Futures

Futures are objects that wrap asynchronous methods. It allows for asynchronous processing of code despite writing in a sequential manner. [More on Futures here.]

In the official Pepper API documentation, explanations and examples are provided for the use case where one multiple Futures can be used within a single method in order to chain operations together, but within the use case of pepper-tickle, it was necessary to make use of multiple shared Futures within multiple asynchronous methods, and because REASON THIS IS NOT POSSILE, this was not possible unless we made use of Atomic Variables.