A collection of Vim tools that I keep forgetting. Many of these are focused on VSCodeVim. Not meant to be exhaustive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get a screenshot of the wordle board and open in a new tab. Run from the dev tools. | |
import('https://html2canvas.hertzen.com/dist/html2canvas.esm.js') | |
.then((html2canvas) => html2canvas.default(document.querySelector("[class^='Board-module_board__']"))) | |
.then((canvas) => window.open(canvas.toDataURL("image/png"))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setPlaybackRate(rate) { | |
Array.from(document.querySelectorAll('video,audio')).forEach((v) => v.playbackRate = rate); | |
} | |
// Mutation observer for interactive UIs | |
// Select the node that will be observed for mutations | |
let targetNode = document.body; | |
// Options for the observer (which mutations to observe) | |
let config = { attributes: true, childList: true, subtree: true }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: | |
(function() { | |
var month = prompt('Month'); | |
var year = new Date().getFullYear(); | |
var yearInput = prompt(`Year (default ${year})`); | |
year = yearInput ? '20' + yearInput : (new Date().getFullYear()); | |
var lastDayOfMonth = new Date(Number(year), Number(month), 0).getDate(); | |
window.location.href = `https://mint.intuit.com/transaction.event?startDate=${month}/01/${year}&endDate=${month}/${lastDayOfMonth}/${year}&exclHidden=T`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Decorator for controller classes for route states. You can reference the class in the | |
* `controller` property. Name is a required property on the config if using the | |
* registerState helper. | |
* @return Function which takes a UI Router config object. | |
*/ | |
export default RouteConfig(target) { | |
return function(config) { | |
target.$uiRouteConfig = config; | |
} |