Skip to content

Instantly share code, notes, and snippets.

View guoyunhe's full-sized avatar
⌨️
typing...

Guo Yunhe guoyunhe

⌨️
typing...
View GitHub Profile
@guoyunhe
guoyunhe / fuck-unsplash-plus.js
Last active June 17, 2023 13:09
Fuck Unsplash+
// ==UserScript==
// @name Fuck Unsplash+
// @namespace https://guoyunhe.me/
// @version 0.1
// @description Remove Unsplash+ shit from Unsplash
// @author Guo Yunhe
// @match https://unsplash.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=unsplash.com
// @grant none
// ==/UserScript==

finally-polyfill

A tiny ~150-byte polyfill for Promise.prototype.finally.

Useful for browsers that support Promise but not the .finally() method.

Usage

npm install finally-polyfill

@mamantoha
mamantoha / set_wallpaper
Last active February 26, 2023 21:02
Set desktop wallpaper in Plasma5 via a dbus command
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops(); for (i = 0; i < allDesktops.length; i++) {d = allDesktops[i]; d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General"); d.writeConfig("Image", "file:///path/to/image.png")}'