Skip to content

Instantly share code, notes, and snippets.

@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 / 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"
//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() {
// ==UserScript==
// @name Duolingo Russian
// @description Duolingo Russian
// @namespace bo33b
// @author bo33b
// @version 1.1
// @match https://www.duolingo.com/*
// @grant none
// ==/UserScript==
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>uuid one-liners</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
#https://web.archive.org/web/20160925022840/http://paste.osmc.io/raw/qiyekuvafe
#!/bin/sh
sudo apt-get update -y
sudo wget http://apt.osmc.tv/pool/main/a/a2dp-app-osmc/a2dp-app-osmc_1.0.7_all.deb -O a2dp.deb
sudo dpkg -i a2dp.deb
sudo apt-get -f -y install
sudo reboot
[
{ "keys": ["ctrl+,"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+."], "command": "toggle_minimap" },
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 6.0 } },
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -6.0 } },
{ "keys": ["f5"], "command": "sftp_upload_file" },
{ "keys": ["ctrl+f5"], "command": "sftp_upload_open_files" }
]
@bo33b
bo33b / tricks.js
Last active August 9, 2020 17:28
Awesome JavaScript tricks and code snippets
import("https://hongru.github.io/proj/canvas2image/canvas2image.js").then(function(module) {
alert("module ready");
let width=1500;height=950;
Canvas2Image.saveAsJPEG(canvasObj, width, height)
});
@bo33b
bo33b / markdown.css
Created March 6, 2016 16:01
Basic, clean, HTML styles
body {
color: #333;
font-family: 'Segoe UI', 'Lucida Grande', Helvetica, sans-serif;
line-height: 1.5;
margin: 50px auto;
max-width: 800px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
// ==UserScript==
// @name Google Dictionary
// @namespace bo33b
// @description Clean Google Dictionary
// @downloadURL https://gist.github.com/bo33b/41365a417f7fdf842f4d/raw/dictionary.user.js
// @version 5.1.1
// @include https://www.google.com/search?q=define+*
// @grant none
// ==/UserScript==