Skip to content

Instantly share code, notes, and snippets.

View autonome's full-sized avatar

Dietrich Ayala autonome

View GitHub Profile
@autonome
autonome / hover-tab-close.js
Created June 10, 2024 09:08
Firefox userChrome.css for showing tab close button on hover, even tho tab is inactive
/* move favicon, throbber and text to the right so that the close button appears on the left */
.tabbrowser-tab .tab-icon-image {
-moz-box-ordinal-group: 2 !important;
}
.tabbrowser-tab .tab-throbber {
-moz-box-ordinal-group: 2 !important;
}
@autonome
autonome / 01_Radicle_in_containers.md
Created March 28, 2024 11:30 — forked from gsaslis/01_Radicle_in_containers.md
Running Radicle Nodes in Containers

Running in Containers

In case you want to run radicle in containers, on the same host (e.g. your laptop), you can use the docker-compose.yml file provided within this repo.

1. Create a profile

  1. Create a folder where you will store the data of your node. e.g. mkdir -p ~/radicle/profiles/bob/.radicle
  2. Set RAD_HOME : export RAD_HOME=~/radicle/profiles/bob/.radicle
  3. Create a key:
  • Pick a good passphrase and store it in your password manager
@autonome
autonome / unmagic.py
Created November 26, 2023 09:20
Firefox profile lz4 de-magicker from mossop
#!/usr/bin/env python
import io
import sys
import lz4.block
MAGIC = b'mozLz40\0'
for path in sys.argv[1:]:
with io.open(path, 'rb') as f:
@autonome
autonome / thingfinder.js
Created March 17, 2023 16:03
script to dump IPFS Thing airtable to local toml files ready for a GHA to make a PR w/ those changes
const https = require('https');
const token = process.env.AIRTABLE_TOKEN;
const url = 'https://api.airtable.com/v0/apptAzTf0HPbYkCbn/Responses'
const options = {
headers: {
'Authorization': 'Bearer ' + token
@autonome
autonome / camera-test.html
Created October 31, 2019 19:59
getUserMedia camera test
<style>
html, body, div, a-scene {
background-color: transparent;
}
#video {
/* overrule a-frame default styles */
width: 100% !important;
max-width: 100% !important;
/*
* Do not remove the @namespace line -- it's required for correct functioning
*/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
/*
Disable tab throbber to stop battery death.
https://bugzilla.mozilla.org/show_bug.cgi?id=1422090#c67
*/
@autonome
autonome / download-site-as-static.sh
Created January 21, 2019 22:52
download website for static/offline use
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains yourdomain.com \
--no-parent \
--no-cache \
<dietrich> asuth: do you know anything about whether indexedb should be available for pages that are non-http/s protocols? looks like it worked until 63.
<dietrich> (or who would know?)
<mconley> dietrich: maybe bevis?
<asuth> dietrich: Are you actually creating origins under new protocols? Many things won't like that.
dietrich: QuotaManager won't create directories for origins it doesn't understand. Here's the "okay" list: https://searchfox.org/mozilla-central/source/dom/quota/ActorsParent.cpp#8462
<asuth> dietrich: In particular, are the protocols implemented via https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/protocol_handlers? Because if so I'd expect the semantics to conform to those of https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
dietrich: And in particular the clause ```User agents must throw a "SecurityError" DOMException if the resulting URL record has an origin that differs from the origin specified by the relevant settings objec
function build(callback) {
Metalsmith(__dirname) // __dirname defined by node.js:
// name of current working directory
.metadata({ // add any variable you want
// use them in layout-files
sitename: "foo",
siteurl: "https://foo.com/",
description: "Website!",
generatorname: "Metalsmith",
generatorurl: "https://metalsmith.io/"
{
"coliseum": {
"name": "Veterans Memorial Coliseum",
"location": {
"latitude": "45.532141",
"longitude": "-122.6693299"
},
"link": "https://goo.gl/maps/sPJe9UY5Nqs"
},
"mainstage": {