Skip to content

Instantly share code, notes, and snippets.

View asportnoy's full-sized avatar

Albert Portnoy asportnoy

View GitHub Profile
function nvm-exec
# match version
set ver "$argv[1]"
if not test "$ver"
echo "Version is missing"
return 1
end
# logic from nvm command to parse version
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
@asportnoy
asportnoy / q.fish
Last active May 9, 2023 20:02
GitHub Copilot CLI for Fish Shell
# Requires the GitHub Copilot CLI from GitHub Next
# https://www.npmjs.com/package/@githubnext/github-copilot-cli#installation-and-setup
# This needs to be set up as a function in your fish config. You can use `funced -s q` to do this.
# Options:
# q -g --git: Use github-copilot-cli git-assist
# q -h --gh: Use github-copilot-cli gh-assist
# Defaults to using what-the-shell (general command assist) if neither option is provided
# Completions for your Fish config:
// ==UserScript==
// @name Open YouTube App
// @version 1.0.4
// @author asportnoy
// @match *://*.youtube.com/*
// @downloadURL https://gist.github.com/asportnoy/628b820184297f5fe296c1a5b79c8000/raw/open-youtube-app.user.js
// @updateURL https://gist.github.com/asportnoy/628b820184297f5fe296c1a5b79c8000/raw/open-youtube-app.user.js
// @homepage https://gist.github.com/asportnoy/628b820184297f5fe296c1a5b79c8000/
// @inject-into content
// ==/UserScript==