You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Menu: Create gist from clipboard// Description: Creates a new GitHub Gist with the contents of your current clipboard// Author: Gregor Martynus// Twitter: @gr2m// https://github.com/gr2m/scriptkit-octokit/const{ Octokit }=awaitnpm("scriptkit-octokit");constoctokit=newOctokit({auth: {scopes: ["gist"],},});// copy the content from the current clipboardconstcontent=awaitpaste();if(!content){console.log("clipboard is empty");exit();}const{ data }=awaitoctokit.rest.gists.create({description: "Created using https://github.com/johnlindquist/kit/discussions/266",public: false,files: {"clipboard.txt": { content },},});awaitcopy(data.html_url);console.log("Gist created at %s",data.html_url);
I highly recommend setting a shortcut, e.g. add to the top:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Install create-gist-from-clipboard
I highly recommend setting a shortcut, e.g. add to the top:
// Shortcut: command option g
Beta Was this translation helpful? Give feedback.
All reactions