Giter Club home page Giter Club logo

commonplace's Introduction

Hello there ๐Ÿ‘‹

I am Fred Oliveira, a software engineer by trade, and currently the VP of Engineering at Capital Factory. Before Capital Factory, I consulted for Gumroad, built Union, was the Director of Engineering at 1776, and before that, I ran a product consultancy called Webreakstuff. A lifetime ago I was the first employee at Techcrunch and co-wrote a book on Redis for O'Reilly. You can find me on Twitter as @f.

commonplace's People

Contributors

dependabot[bot] avatar dinapetrovic avatar fredoliveira avatar jacksonpires avatar moubry avatar pgaspar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

commonplace's Issues

Change Listening NIC

I'd love to put this on my home server and access it from all my machines, but I can't seem to find how to change it from listening on localhost. Also, is there a way to get it to run in the background or daemonize? Or should I just use screen?

Unable to define directory path with ~

I installed commonplace somewhere outside my Dropbox folder and tried changing the wikidir to ~/Dropbox/Documents/Markdown instead of wiki but then got a Wiki directory not found message whenever I tried to access the commonplace server.

I then installed commonplace inside the Markdown folder and set the wikidir to ../ which let me see the wiki correctly. Same happens if I change the path to /Users/patrick/Dropbox/Documents/Markdown (that also worked in the commonplace installation outside my Dropbox folder). It just doesn't work with the home character.

Rendering markdown files stored into webdav folder ?

I'm interested to link a wiki mardown renderer like commonplace with a webdav folder which contain markdown file.
Each time a student add a file into this folder, commonplace can render it on the web, do you think it's possible ?

Redcarpet 2.0 == fail

It looks like Redcarpet has been bumped to 2.0 and thus line 97 of lib/commonplace.rb tosses up

undefined method 'new' for Redcarpet:Module

My quick fix:

Change:

return Redcarpet.new(parse_links(@content))

to:

markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
return markdown.render(parse_links(@content))

I'm relatively new to Ruby, my first try was changing the gemfile to read

gem "redcarpet", "1.17.2"

But since bundle install or update now install 2.0 this was not working. I'm not sure what would need to be done to make this conditional in the commonplace.rb file to deal with the 2.0 and pre 2.0 versions of Redcarpet.

I'm guessing though that instantiating a new Markdown instance on every page load is probably not a good idea either. But for the moment this works.

Ignore Files

Is there a way of ignoring files in the list of pages?
My wiki is listing .DS_STORE files and ._Sidebar...

Perhaps doing it on the commonplace.yml?..

Invalid byte sequence in US-ASCII

I'm getting the following error after doing a clean install of commonplace and navigating to the markdown_test page.

I am using passenger/apache and my system locale is set to en_US.UTF-8

ArgumentError - invalid byte sequence in US-ASCII:
/opt/commonplace/lib/commonplace.rb:107:in gsub' /opt/commonplace/lib/commonplace.rb:107:inparse_links'
/opt/commonplace/lib/commonplace.rb:97:in content' /opt/commonplace/lib/server.rb:105:inshow'
/opt/commonplace/lib/server.rb:35:in block in <class:CommonplaceServer>' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:1209:incall'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:1209:in block in compile!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:769:in[]'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:769:in block (3 levels) in route!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:785:inroute_eval'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:769:in block (2 levels) in route!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:818:inblock in process_route'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:816:in catch' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:816:inprocess_route'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:768:in block in route!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:767:ineach'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:767:in route!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:883:indispatch!'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:703:in block in call!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:868:inblock in invoke'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:868:in catch' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:868:ininvoke'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:703:in call!' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:689:incall'
/usr/local/lib/ruby/gems/1.9.1/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:incall'
/usr/local/lib/ruby/gems/1.9.1/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:incall'
/usr/local/lib/ruby/gems/1.9.1/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib/rack/nulllogger.rb:9:incall'
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib/rack/head.rb:9:in call' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:1331:inblock in call'
/usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:1400:in synchronize' /usr/local/lib/ruby/gems/1.9.1/gems/sinatra-1.3.0/lib/sinatra/base.rb:1331:incall'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/rack/request_handler.rb:96:in process_request' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:513:inaccept_and_process_next_request'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:274:in main_loop' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:206:instart_request_handler'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:171:in block in handle_spawn_application' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb:479:insafe_fork'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:166:in handle_spawn_application' /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:357:inserver_main_loop'
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.