Skip to content

tonobo/muh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muh - Just paste...

This projects provides a full in memory paste service. A gist could have multiple snippets or images. Each snippet would be highlighted by using devil javascript

Performance as a service.

Muh should only provide a frontend, which is designed and optimized for usability.

Additionaly we will provide you a cli tool which is linked through a high performance API. ;)

Getting started.

User

  • Creating a User
  User.create(username: 'timmyArch', password: 'swordfish')
  #=> User...

Reusing username is not allowed.

  User.create(username: 'timmyArch', password: 'swordfish')
  RuntimeError
  • Find users
  User.find_by(username: 'timmyArch')
  #=> User...
  User.find_by(username: 'not-existing')
  #=> nil
  User.find_by(uuid: '<UUID>')
  #=> User...
  • Authorize user
  User.authorize!(username: 'timmyArch', password: 'swordfish')
  #=> User...
  User.authorize!(username: 'timmyArch', password: 'invalid-password')
  #=> nil

Gist / Snippet

  • Create a Gist with multiple Snippets
  gist = Gist.new
  gist.id #=> Your uniq gist id.
  gist.snippets.create(Snippet.new(paste: '<code>', lang: 'ruby')
  gist.snippets.create(Snippet.new(paste: '<code>', lang: 'go')
  gist.snippets.create(Snippet.new(paste: '<code>', lang: 'yaml')
  • Find gist with snippets
  Gist.find(<GIST-ID>).snippets

Snippet

  • Find snippet
  Snippet.find(<SNIPPET-ID>)
  • Update snippet
  Snippet.find(<SNIPPET-ID>).update(paste: '<new_code>')
  Snippet.find(<ANOTHER-SNIPPET-ID>).update(lang: 'htmlmixed')

About

Ah quick'n dirty in memory paste service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors