/snippets

Code snippet rails app (like gist) to run on your internal network at work or home

Primary LanguageRubyMIT LicenseMIT

Description

Share code snippets with other team members on your local network like gist (https://gist.github.com/gists).

At work we use IRC all day long. We need to show each other pieces of code almost hourly. For security purposes we cannot put them on an outside server like gist. I wrote this app in a few hours on a Saturday to solve this issue. We just run this on one of our development systems. It takes in a block of code and then gives you  URL to reference it. 

Features

- List of all snippets (http://localhost:3000/snip/) with snippet title, date created and link to the snippet (http://localhost:3000/snip/1)

- Page for individual snippets (the id is just an auto_increment from MySQL)

- Form for adding new snippets (http://localhost:3000/snip/new)

Installation

- you should be able to just 'git clone' and then run 'rails server'. At work we run it through Passenger. 

TODO

- do something with the tag field. The idea was that you could tag a snippet with 'ruby' or 'project name'. Then create a way to sort by tag

- make the snippets look nicer with line numbers like gist

- have the list of snippets only show a few lines of a snippet. Right now it just prints the entire thing out