Skip to content

Instantly share code, notes, and snippets.

View paulproteus's full-sized avatar

Asheesh Laroia paulproteus

View GitHub Profile
@paulproteus
paulproteus / launchlog.txt
Created June 5, 2020 05:23
Launch timing log
➜ helloworld git:(master) /Users/asheesh/.briefcase/tools/android_sdk/platform-tools/adb logcat -s 'org.beeware.android.MainActivity.appLaunch'
--------- beginning of system
--------- beginning of crash
--------- beginning of main
06-04 22:21:58.201 8177 8177 D org.beeware.android.MainActivity.appLaunch: onCreate() start
06-04 22:21:58.413 8177 8177 D org.beeware.android.MainActivity.appLaunch: startPython() start
06-04 22:21:58.413 8177 8177 D org.beeware.android.MainActivity.appLaunch: unpackPython() start
06-04 22:21:58.413 8177 8177 D org.beeware.android.MainActivity.appLaunch: Unpacking Python with ABI x86 to /data/user/0/org.ash_eesh.helloworld/files/python/stdlib
06-04 22:22:00.652 8177 8177 D org.beeware.android.MainActivity.appLaunch: Unpacking rubicon-java to /data/user/0/org.ash_eesh.helloworld/files/python/rubicon-java
06-04 22:22:00.666 8177 8177 D org.beeware.android.MainActivity.appLaunch: Unpacking Python assets to base dir /data/user/0/org.ash_eesh.helloworld/files/python/user_co
@paulproteus
paulproteus / README.md
Last active June 5, 2020 20:35
ThinkPad Ultrabay Slim HDD adapter, 62P4553 62P4552

I used to use this Ultrabay Slim HDD adapter, but I don't anymore. I'd love to give it to you if you want it!

FRU part number 62P4553 / assembly part number 62P4552

It also has a 40GB fully working (tested) 2.5" IDE hard drive, FRU part number 39T2521 (assembly part number 39T2520).

The IDE hard drive is in a drive sled that makes it easy to add/remove from the Ultrabay Slim adapter.

Free to a good home, plus $5 for shipping to the USA (if you're international, ask and I can give you an estimate). Email me ([email protected]) or contact me at https://forum.thinkpads.com/viewtopic.php?f=11&t=130758&p=846065#p846065

@paulproteus
paulproteus / known-issues-of-beeware-android.md
Last active June 10, 2020 05:59
Known issues of beeware/briefcase Android tooling

On Android, Toga probably has problems if you rotate the screen. We're probably assuming the activitySingleton never changes. Or... maybe we don't? Anyway, worth figuring this out.

See Ch. 5 (Looper/Handler) of Android Concurrency by G. Blake Meike.

Sometimes one needs to uninstall the app, then reinstall it, for it to really update. I think this has to do with us being careless about app keys, and not really detecting the error condition.

@paulproteus
paulproteus / select_example.c
Created June 10, 2020 19:38
Select on a file
#include <stdio.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/select.h>
int main(void) {
int read_fd = open("example.txt", O_NONBLOCK | O_RDONLY);
@paulproteus
paulproteus / Python-3.6-Android.md
Last active June 13, 2020 19:29
Python 3.6 on Android notes

OK, so I've got it built.

  • Is OpenSSL OK?
    • Looks like no -- should probably check this out
  • Fix my OpenSSL patch to apply, unless I should do it at runtime (?) - don't, b/c runtime is slow.
  • Is libxz OK?
    • Looks OK -- we have ./lib/python3.6/lib-dynload/_lzma.cpython-36m.so
  • Is sqlite OK?
    • Looks OK -- we have ./lib/python3.6/lib-dynload/_sqlite3.cpython-36m.so
  • Is ctypes OK?
@paulproteus
paulproteus / log.txt
Created June 14, 2020 04:52
Hello World w/ Android event loop log
06-13 21:51:17.821 4372 4389 D stdio : Starting to capture stdout/stderr to Android log.
06-13 21:51:17.822 4372 4389 D stdio : stdout now successfully routes into the stdio logger.
06-13 21:51:19.086 4372 4389 D stdio : Start Python runtime...
06-13 21:51:19.112 4372 4389 D stdio : Initializing Python runtime...
06-13 21:51:19.351 4372 4389 D stdio : Initializing Python threads...
06-13 21:51:19.351 4372 4389 D stdio : Import rubicon...
06-13 21:51:19.359 4372 4389 D stdio : Rubicon namespace package not registered!
06-13 21:51:22.302 4372 4389 D stdio : Python app launched & stored in Android Activity class
06-13 21:51:22.320 4372 4389 D stdio : Started event loop
06-13 21:51:22.320 4372 4389 D stdio : Doing call_later on
06-14 18:26:07.329 5258 5276 D stdio : Starting to capture stdout/stderr to Android log.
06-14 18:26:07.329 5258 5276 D stdio : stdout now successfully routes into the stdio logger.
06-14 18:26:08.615 5258 5276 D stdio : Start Python runtime...
06-14 18:26:08.616 5258 5276 D stdio : Initializing Python runtime...
06-14 18:26:08.821 5258 5276 D stdio : Initializing Python threads...
06-14 18:26:08.821 5258 5276 D stdio : Import rubicon...
06-14 18:26:10.685 5258 5276 D stdio : Python app launched & stored in Android Activity class
06-14 18:26:10.874 5258 5276 D stdio : Toga app: onCreate
06-14 18:26:10.894 5258 5276 D stdio : Toga app: onStart
06-14 18:26:10.899 5258 5276 D stdio : Toga app: onResume
@paulproteus
paulproteus / macOS terminal notifications, delayed, etc.md
Created June 16, 2020 04:28
macOS terminal notifications, delayed, etc.
echo terminal-notifier -message alttab -open https://github.com/lwouis/alt-tab-macos/issues/376 | at now + 20 minutes
@paulproteus
paulproteus / README.md
Last active June 16, 2020 05:57
TCP asyncio hello world

Look at this TCP hello world video

@paulproteus
paulproteus / output.txt
Created June 16, 2020 20:51
Happy briefcase run android output
$ briefcase run android -d @beePhone
[helloworld2] Generating application template...
Using app template: https://github.com/beeware/briefcase-android-gradle-template.git
Using existing template (sha 158d51d33468f2df9eb60445beb7cd9bf7312d87, updated Sat Jun 13 17:14:26 2020)
[helloworld2] Installing support package...
Using support package https://briefcase-support.org/python?platform=android&version=3.7
... using most recent revision
Python-3.7-Android-support.b4.zip already downloaded