Skip to content

Instantly share code, notes, and snippets.

@fabricedesre
fabricedesre / vdc.md
Created October 19, 2022 02:36
Comparing vdc with vs. without zygote

With zygote:

10-19 02:16:27.704     1     1 I init    : starting service 'exec 2 (/system/bin/vdc checkpoint markBootAttempt)'...
10-19 02:16:27.704     1     1 I init    : SVC_EXEC service 'exec 2 (/system/bin/vdc checkpoint markBootAttempt)' pid 498 (uid 1000 gid 1000+0 context default) started; waiting...
10-19 02:16:27.711     1     1 I init    : Service 'exec 2 (/system/bin/vdc checkpoint markBootAttempt)' (pid 498) exited with status 0 waiting took 0.006000 seconds
10-19 02:16:27.711     1     1 I init    : Sending signal 9 to service 'exec 2 (/system/bin/vdc checkpoint markBootAttempt)' (pid 498) process group...
10-19 02:16:27.759     1     1 I init    : Calling: /system/bin/vdc checkpoint needsCheckpoint
10-19 02:16:27.763   555   555 D vdc     : Waited 0ms for vold
10-19 02:16:27.766     1     1 I vdc     : vdc terminated by exit(1)

In Capyloon we use a virtual file system to store user data in a broad sense. It can be usual objects like pictures, downloaded documents etc. but also contacts, navigation history entries, media playback sessions. These are organized as a hierarchy, but leafs are not plain files: they are resources that can be represented by different variants: for instance, an image will have a default variant with the full size version, but also a thumbnail variant and a exif-metadata variant if applicable. Media playback sessions store the page url, title and track info in the default variant, but also a poster image for the video as a variant, etc. Resources also have custom metadata: we maintain a "visit score" state that helps with surfacing the most relevant results in search queries (similar to what Firefox uses in the awesomebar). We want to persist these resources in wnfs, so we need some solution to map resources with variants to the more simple model of wnfs. I can think of a couple of options:

  1. Turn each resou
@fabricedesre
fabricedesre / dweb.goggles
Created July 15, 2022 00:30
A Brave Search Goggle for the Distributed Web
! name: dWeb Goggle
! description: Only return results served from ipfs or ipns
! public: true
! author: Fabrice Desré
! Remove results not matching any other rule
$discard
https://*.ipfs.*$boost=1
https://*.ipns.*$boost=1
fabrice@xps13:~/dev/servonk$ /home/fabrice/dev/cargo/target/release/cargo update -p gcc
Updating registry `https://github.com/rust-lang/crates.io-index`
error: failed to select a version for `mio`.
... required by package `actix-web v0.4.0`
... which is depended on by `servonk v0.1.0 (file:///home/fabrice/dev/servonk)`
versions that meet the requirements `^0.6.13` are: 0.6.14, 0.6.13
all possible versions conflict with previously selected packages.
previously selected package `mio v0.6.9`
@fabricedesre
fabricedesre / cargo.log
Last active March 14, 2018 16:10
Cargo log
This file has been truncated, but you can view the full file.
DEBUG 2018-03-14T15:53:07Z: cargo::core::workspace: find_root - trying /home/fabrice/dev/Cargo.toml
DEBUG 2018-03-14T15:53:07Z: cargo::core::workspace: find_root - trying /home/fabrice/Cargo.toml
DEBUG 2018-03-14T15:53:07Z: cargo::core::workspace: find_root - trying /home/Cargo.toml
DEBUG 2018-03-14T15:53:07Z: cargo::core::workspace: find_root - trying /Cargo.toml
DEBUG 2018-03-14T15:53:07Z: cargo::core::workspace: find_members - only me as a member
TRACE 2018-03-14T15:53:07Z: cargo::core::registry: register_lock: ident_case v1.0.0
TRACE 2018-03-14T15:53:07Z: cargo::core::registry: register_lock: heartbeats-simple-sys v0.4.1
TRACE 2018-03-14T15:53:07Z: cargo::core::registry: -> libc v0.2.33
TRACE 2018-03-14T15:53:07Z: cargo::core::registry: -> pkg-config v0.3.9
TRACE 2018-03-14T15:53:07Z: cargo::core::registry: -> cmake v0.1.29
@fabricedesre
fabricedesre / firefox_marketplace_download.sh
Created March 7, 2018 21:04
Firefox marketplace download script
#!/bin/bash
API_ROOT_URL=https://marketplace.firefox.com
SEARCH_REQUEST=/api/v2/apps/search/?dev=firefoxos
# See https://firefox-marketplace-api.readthedocs.io/en/latest/topics/apps.html
OUT_DIR=`pwd`/output
mkdir -p $OUT_DIR
function download_json {

Keybase proof

I hereby claim:

  • I am fabricedesre on github.
  • I am fabrice (https://keybase.io/fabrice) on keybase.
  • I have a public key whose fingerprint is F2CA 1372 E15A C449 D2CA 522D C016 62E2 4346 3FCA

To claim this, I am signing this object:

@fabricedesre
fabricedesre / gist:2196bf394d07fa948f7f
Created May 11, 2015 20:39
Verifying I am +fabrice_desre on my passcard. https://onename.com/fabrice_desre
Verifying I am +fabrice_desre on my passcard. https://onename.com/fabrice_desre
Verifying I am +fabrice_desre on my passcard. https://onename.com/fabrice_desre
// Go to about:config, turn on devtools.chrome.enabled and dom.udpsocket.enabled
// Open the console with Ctrl+Shift+J
// Copy/paste that in the input field:
{
var url = "http://foo.com/bar";
Components.utils.import("resource://gre/modules/Services.jsm");
Services.perms.add(Services.io.newURI(url, null, null), "udp-socket", 1, 0, 0);
}