Skip to content

Instantly share code, notes, and snippets.

@jkaipr
jkaipr / foreground.js
Created December 21, 2021 10:03
Spyder - Chrome extension listening to page loading and user input events
// This script gets injected into any opened page
// whose URL matches the pattern defined in the manifest
// (see "content_script" key).
// Several foreground scripts can be declared
// and injected into the same or different pages.
const sendMessageToBackground = (message) => {
chrome.runtime.sendMessage({ message });
}
@calliecameron
calliecameron / onyx-boox-handwriting-optimisation.md
Last active May 1, 2024 20:49
Onyx Boox handwriting optimisation in any app

Onyx Boox handwriting optimisation in any app

All credit to this thread for figuring out how to do this, I'm just documenting it more thoroughly.

Tested on Nova Air C with firmware 3.5 (2023-11-20).

Handwriting optimisation makes the pen usable in apps installed from the play store. By default it's only available for OneNote, Evernote and WPS -- they have a 'handwriting' tab in the optimisation settings, other apps don't -- but can be enabled for any app by editing the file /onyxconfig/eac_config as root.

Note: whenever you edit eac_config, you have to reboot the device for the changes to take effect. Just restarting the app isn't enough.

@renoirb
renoirb / a.json
Created July 7, 2014 17:50
A few duplicates that gets overwritten while running mdn-compat-importer see:
[{
"slug": "a",
"contents": {
"desktop": {
"Basic support": {
"Chrome": {
"?": "y"
},
"Firefox": {
"notes": {
<!DOCTYPE html>
<html>
<head>
<title>You Do</title>
</head>
<body>
<div></div>
</body>
{"name":"Browser_5_1_4_1","objectlist":[{"class":"ImageButton","left":520,"top":2712,"right":920,"bottom":2880,"resource-id":"softkey%3A%2Fhome","uuid":"1ca9da58-2d5d-49ed-f3da-770baf67214c","codegen":"pressHome","varname":"Home","objecttable-uuid":"e6dc4d2b-5ed5-403b-acc5-fc004252a09a","action":"codegen","uititle":"ImageButton%0Asoftkey%3A%2Fhome","uinameinfo":"%3Csoftkey%3A%2Fhome%3E","actiontype":"script","randomexec":"100","waittime":"2","loadfromsavedobject":true},{"class":"ImageButton","resource-id":"softkey%3A%2Fscriptaction","codegen":"logStartTest(%22Browser_5_1_4_1%22)","varname":"logStart","objecttable-uuid":"747043a9-397b-45ae-c4ee-40ff7464d279","action":"click","uititle":"ImageButton%0Asoftkey%3A%2Fscriptaction","uinameinfo":"%3Csoftkey%3A%2Fscriptaction%3E","actiontype":"script","randomexec":"100","waittime":"0","loadfromsavedobject":true},{"class":"ImageButton","resource-id":"softkey%3A%2Fscriptaction","codegen":"gotoAppPixel(%22Chrome%22)","varname":"gotoChrome","objecttable-uuid":"38a1c36e-7a
@snowboardmtbf
snowboardmtbf / Browser.json
Last active May 1, 2024 20:48
SimpleTest
{"name":"Browser","objectlist":[{"class":"ImageButton","resource-id":"softkey%3A%2Fscriptaction","codegen":"gotoAppPixel(%22Chrome%22)","varname":"scriptAction_1","objecttable-uuid":"2dc08646-304b-4a2e-821c-34ccdfdaa1cb","action":"click","uititle":"ImageButton%0Asoftkey%3A%2Fscriptaction","uinameinfo":"%3Csoftkey%3A%2Fscriptaction%3E","actiontype":"script","randomexec":"100","waittime":"2","loadfromsavedobject":true},{"parentid":-3221225464,"sourcenodeid":-3221225472,"windowid":55,"index":0,"classname":"EditText","class":"EditText","parentpathid":-706290259,"objectid":800382463,"selfid":613381324,"resource-id":"com.android.chrome%3Aid%2Furl_bar","propmask":156,"bounds":"%5B70%2C102%5D%5B1083%2C258%5D","top":102,"left":70,"bottom":258,"right":1083,"uitreeindex":12,"childlevel":0,"textdescid":-957947391,"nodehash-id":234061338,"uuid":"f1bc1cde-04d9-4d45-fb3e-8ab7227d716d","varname":"EditText_UrlBar_5_1","objecttable-uuid":"3d39e796-232c-404b-d952-9fe12109341a","action":"codegen","uititle":"EditText%0Acom.androi
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active May 1, 2024 20:48
Ubuntu and Debian Cloud images in Proxmox
@chriswayg
chriswayg / create-cloud-template.sh
Last active May 1, 2024 20:47
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@millermedeiros
millermedeiros / osx_setup.md
Last active May 1, 2024 20:46
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@fanfare
fanfare / gist:96da458bc902292542b836a682a4586a
Created May 20, 2023 01:27
uBlock filters to hide Twitter's "Discover More" feature
twitter.com##div[data-testid="cellInnerDiv"]:has(h2):has-text(Discover more) ~ *
twitter.com##div[data-testid="cellInnerDiv"]:has(h2):has-text(Discover more)