New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

snippit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snippit

  • 1.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Snippit

Gem Version CI CodeQL codecov

Define, store, and output your code snippets.

Usage

All uses of snippit can be replaced with the shortcut snip.

# Define a snippet called "hello-world.js"
$ snippit --save hello-world.js

# Set the slug and descriptive name of the snippet
$ snippit --save hello-world.js --slug hw-js --name "JavaScript Starter"

# Output the "JavaScript Starter" snippet to a file called "index.js"
$ snippit --get hw-js > index.js

# List all of your code snippets
$ snippit --list

How it works

Code snippets get stored in a directory called .snippit in your home directory. The actual code snippet filenames are slugified versions of the snippet name. .__definitions__.yml is a reserved filename, as it is used to map snippet slugs (filenames) to their human-readable names.

FAQs

Package last updated on 30 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc