Skip to content

Instantly share code, notes, and snippets.

//javascript:(function(d){d.head.appendChild(d.createElement('script')).src="https://rawgit.com/bo33b/dbe89054fe400d144b7b90961e586344/raw/iOS-userscripts.user.js"})(document);
(function(window, document) {
var host = window.location.host.split('.');
document.head.appendChild(document.createElement('script')).src = 'https://rawgit.com/bo33b/' + ({
duolingo() {
return '8485a04a0834a18bb1ceef71fad89b36/raw/duolingo.user.js'
},
ebay() {
@bo33b
bo33b / 72-static-name.rules
Created March 12, 2024 01:59
RasPi statically link network interface names to mac
# Create file /etc/udev/rules.d/72-static-name.rules
# Add these, changing the mac addresses accordingly.
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:01", KERNEL=="e*",NAME="eth1"
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:02", KERNEL=="e*",NAME="eth2"
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:03", KERNEL=="e*",NAME="eth3"
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:04", KERNEL=="e*",NAME="eth4"
@bo33b
bo33b / turn_off_monitor.vicki.js
Last active March 27, 2024 18:35
This is a Vicki (getvicki.net) script to enable turning off your PC monitors
// ==VickiScript==
// @name Turn off the monitor
// @version 1.2
// @description Turn off all computer monitors.
// @utterance Ask $invocation to turn off the monitor
// @permission native
// @id custom.monitorOff
// @icon /res/icons/script_native.png
// ==/VickiScript==
@bo33b
bo33b / gmailAutoArchive.js
Created February 13, 2025 06:22
Google Apps Script that archives all labeled messages in the Gmail inbox after 2 days
function gmailAutoarchive() {
// Build the query
var query = "in:inbox is:read has:userlabels older_than:2d";
// Get the threads
var threads = GmailApp.search(query);
// Archive the threads
for (var thread of threads) thread.moveToArchive();