-
Starting in crDroid 10.x (Android 14.0) and onwards, we're using retrofitted dynamic partitions to avoid the constant threat of running out of space in the GPT system partition with any sizeable Google Apps package. Don't panic.
This will not permanently alter or damage your device, as it makes no changes to the underlying GPT partition table. Following any ROM's installation guide will overwite the changes, so there are no extra steps to "convert back to normal partitions".
This does mean that you cannot use TWRP or other custom recovery to install crDroid on the OnePlus 6-series, as they do not have the necessary kernel and dynamic partition layout changes compiled in to support the way we're doing things.
-
Phone setup:
| import torch | |
| from safetensors.torch import save_file | |
| INPUT_NAME = "model_weights.ckpt" | |
| OUTPUT_NAME = "model.safetensors" | |
| state = torch.load(INPUT_NAME, map_location="cpu") | |
| new_state = {} | |
| for key, value in state.items(): |
| // | |
| // MacOS Accessibility Notifications | |
| // Notice: this version doesn't take into account new apps after this code is executed | |
| // Created by Phi Hiep Nguyen and AI on 2024-10-08. | |
| // | |
| import Cocoa | |
| import Foundation | |
| // AppObserver: Monitors and reports application activation events on macOS |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Power Saving Mode detection</title> | |
| </head> | |
| <body> | |
| <div>Power Saving Mode? <code id="powerSavingMode"></code></div> | |
| <script type="module"> |
So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.
-
Database in a browser, a spec (Stepan Parunashvili)
What problem are we trying to solve with a sync system?
-
The web of tomorrow (Nikita Prokopov)
How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.
This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.
Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4
The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.
| // paste in console of any https site to run (e.g. this page) | |
| // sample arguments for registration | |
| // https://fidoalliance.org/specs/fido-u2f-v1.1-id-20160915/fido-u2f-raw-message-formats-v1.1-id-20160915.html#authentication-response-message-success | |
| var createCredentialDefaultArgs = { | |
| publicKey: { | |
| // Relying Party (a.k.a. - Service): | |
| rp: { | |
| name: "Acme" | |
| }, |
.env file for me sparing me the need to pollute my session with environment variables.
I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env files.
When attempting to run source .env in a project, I usually encounter this problem:
| //Promise.allSettled() vs Promise.all() | |
| //allSettled: returns when all promises have either resolved or rejected | |
| const getGitHubUser = async (usernames: []) => { | |
| const result = await Promise.allSettled( | |
| usernames.map(async (name: string) => { | |
| try { | |
| const response = await fetch( | |
| `https://api.github.com/users/${name}` | |
| ) |
| { | |
| "agent": { | |
| "metrics_collection_interval": 10, | |
| "logfile": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log" | |
| }, | |
| "metrics": { | |
| "metrics_collected": { | |
| "cpu": { | |
| "resources": [ | |
| "*" |
