jonathanj / clj-codetip Goto Github PK
View Code? Open in Web Editor NEWclj-codetip – A simple Clojure Ring pastebin
License: MIT License
clj-codetip – A simple Clojure Ring pastebin
License: MIT License
Currently long lines are not soft-wrapped, I don't see any reason not to wrap them by default.
This would allow for seamless upgrades (although there aren't any of those yet), and also for a seamless first-run database creation, without requiring using the lein
plugin in the deployment environment.
Having the ability to view/download a paste as plain text may be useful, similar to the "Raw" functionality in GitHub's Gists.
Pasting a non-ASCII character seems to result in mojibake (at a guess, the browser is sending UTF-8, but codetip is decoding as ISO-8859-1).
Ideally clj-codetip should allow for pasting of image data. Some support already appears to be there, since a "Drag files here" highlight appears when you drag things into the content field. However, presently it appears to be rendered out as text.
Currently this gets very spammy, and is probably unnecessary in most cases.
When pastes are supposed to expire the below SQL exception happens instead:
Jan 13, 2016 1:32:07 PM clojure.tools.logging$eval1$fn__5 invoke
INFO: {:ssl-client-cert nil, :remote-addr 192.168.10.51, :params {}, :headers {host pastebin.domain.here, accept-language en-US,en;q=0.5, if-modified-since Wed, 03 Jun 2015 12:52:50 GMT, user-agent Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0, accept-encoding gzip, deflate, connection keep-alive, accept image/png,image/*;q=0.8,*/*;q=0.5}, :server-port 80, :content-length nil, :content-type nil, :character-encoding nil, :uri /static/codetip.svg, :server-name pastebin.domain.here, :query-string nil, :body #<HttpInput org.eclipse.jetty.server.HttpInput@32b47030>, :multipart-params {}, :db-conn {:connection #<SQLiteConnection org.sqlite.SQLiteConnection@5c993556>, :connection-uri jdbc:sqlite:codetip.db}, :scheme :http, :request-method :get}
java.sql.SQLException: database connection closed
at org.sqlite.core.CoreConnection.checkOpen(CoreConnection.java:261)
at org.sqlite.jdbc3.JDBC3Connection.getAutoCommit(JDBC3Connection.java:140)
at clojure.java.jdbc$db_transaction_STAR_.doInvoke(jdbc.clj:574)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clj_codetip.database$delete_expired_pastes_BANG_.invoke(database.clj:30)
at clj_codetip.database$_schedule_paste_expiry$fn__12177.invoke(database.clj:37)
at chime$chime_at$fn__12139$state_machine__10400__auto____12140$fn__12142$fn__12148.invoke(chime.clj:68)
at clojure.core.async$thread_call$fn__10579$fn__10580.invoke(async.clj:390)
at clojure.core.async$thread_call$fn__10579.invoke(async.clj:390)
at clojure.lang.AFn.run(AFn.java:22)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Any insights would be appreciated.
It would be nice to have the cdn assets included here as a submodule, and the references in the view changed to reflect that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.