Skip to content

Instantly share code, notes, and snippets.

View harsilspatel's full-sized avatar
⌨️
Taming the terminal, one dotfile at a time!

Harsil Patel harsilspatel

⌨️
Taming the terminal, one dotfile at a time!
View GitHub Profile
@harsilspatel
harsilspatel / highligher.user.js
Last active February 25, 2022 13:07
accent parts of my frequent websites
// ==UserScript==
// @name highlighter
// @namespace harsilspatel
// @version 0.2
// @description accent parts of website
// @author harsilspatel
// @require https://cdn.jsdelivr.net/npm/rainbowvis.js@1.0.1/rainbowvis.min.js
// @match https://news.ycombinator.com/*
// @downloadURL https://gist.github.com/harsilspatel/1b5226a33e0d5c613fb6e6588e419eae/raw/highligher.user.js
// @updateURL https://gist.github.com/harsilspatel/1b5226a33e0d5c613fb6e6588e419eae/raw/highligher.user.js
@harsilspatel
harsilspatel / forward-slash.user.js
Last active May 28, 2023 11:58
A Userscript to focus search bar on "/" keypress
// ==UserScript==
// @name forward-slash
// @namespace harsilspatel
// @version 0.7
// @description press "/" to focus on search bar
// @author harsilspatel
// @match *://*/*
// @downloadURL https://gist.github.com/harsilspatel/886c37b5a4c0c7de97a2bf1983bd8f7a/raw/forward-slash.user.js
// @updateURL https://gist.github.com/harsilspatel/886c37b5a4c0c7de97a2bf1983bd8f7a/raw/forward-slash.user.js
// @icon https://www.google.com/s2/favicons?domain=google.com
@harsilspatel
harsilspatel / machine.js
Last active August 26, 2021 04:50
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

Keybase proof

I hereby claim:

  • I am harsilspatel on github.
  • I am harsilspatel (https://keybase.io/harsilspatel) on keybase.
  • I have a public key ASAuqV7eeooWtmUs8nJhIM23rnAsOGWqM2Vl0-EXAe-SKgo

To claim this, I am signing this object:

@harsilspatel
harsilspatel / forEachDelayed.js
Created October 8, 2018 07:52
a snippet to perform delayed execution of a given function on each element of the array Raw
forEachDelayed = (arr, interval, f) => {
arr.forEach((item, index) => {
setTimeout(() => {
f(item);
}, index * interval);
});
};
// forEachDelayed(['a','b','c','d'], console.log, 1000)
//> a (immediately)