Weblog for Costin Manolache

Technical stuff

Saturday, November 26, 2016

Test stackedit

Evaluating Stackedit

I am looking for an open source a markdown editor running in a browser, for chrome/android.

Stackedit use nodejs at least for some features, but appears it can work offline. It can sync the local browser storage with Google Drive or a private CouchDB or Dropbox. It can publish to Blogger and github among other things - but no Gogs. Blogger support is interesting - I stopped using blogger in large part because of the editor, I write most of my notes in markdown in a private git repository, didn’t bother with setting up a convert/publish system - having it integrated may motivate me to cleanup and publish other random notes.

A docker image is provided that can run on a private domain, nodejs based. Seems to have some collaborative editing if using a CouchDB, including support for private CouchDB when using stackedit.io.

Seems to support frontmatter and a comments system - the comments get saved in a HTML comment, at the end of the document as “se_discussion_list:JSON”, containing ‘selectionStart/selectionEnd/comment[]’. Presumably this is integrated in the couch DB support and synced, but didn’t test it yet.

On google drive: the permissions allow it to add new documents to drive, create or open documents explicitly from drive - but it can’t see or access any other file. I assume dropbox is similar. Also seems to have a way to publish via ssh - so some random hosting site like dreamhost.


It can import/export local disk - but one file a time. Shouldn’t be a problem if files are saved to Drive, but still need to be opened in Stackedit one by one.

Table Supported
No auto-indent

So far I haven’t found a good markdown editor except Emacs orgmode that is good with tables.

For editing-in-chrome I also found Drive Notepad. Both Drive Notepad and Stackedit are based on ace.js - but Stackedit has more integrations with external storage, while Notepad only support Drive, and is much simpler/cleaner as a result. On the other side, Notepad supports most programming languages - as long as the source is stored in google drive.

`

Wednesday, November 16, 2011

Code search

With google code search going away, I did a quick eval of the options. It was surprisingly easy - I just tried an android search, only one found answers: Grepcode

  • includes android trees
  • eclipse/intellij integration
  • API - you can see all source code they crawl, including versions
  • even allows binary download for jar/javadoc/source
Other options: 
http://www.koders.com - no android

http://opensearch.krugle.org - even fewer projects indexed



Monday, November 14, 2011

Direct connection to an xpra window in winswitch

Use case:

  • you have a server with winswitch, where you run your applications
  • server is behind a firewall - only SSH port open
  • a client computer - you don't want to install the full winswitch, only Xpra 
On server: "xpra list" -> find the port number ( :64 in my case )

On client: 
  • copy .winswitch/server/sessions/PORT/session.pass to local machine
  • xpra attach ssh:HOST:PORT --password-file=...session.pass
Winswitch seems to start (for an xpra session ) one Xvfb-for-Xpra server, dbus and gnome-keyring -daemon.  Haven't tried VNC sessions - I'm experimenting with xpra, will try NX next. The cool thing so far with xpra is that it's very easy to resize the application window - not so easy with VNC or normal 'desktop' sharing. 


Sunday, November 13, 2011

Remote display - done right

It's mostly a wrapper around various existing technologies - VNC, NX,
and the new http://xpra.org/.  But it's cross-platform, and very easy to use - shocking in today's world of hard to configure and complex software.

The main goal is to start an app on a machine, and than continue to use it on a different machine. I start Eclipse and chrome on my main desktop, than when I use the laptop I just 'attach' to them. Speed is pretty good, certainly faster then running it on the laptop ( which has far less RAM ).

Xpra is similar with VNC - it starts a dedicated Xvfb server for each application to keep them isolated. The wrapper and Xpra are python - I looked briefly, pretty clean code.

On the 'easy to use' - uses mDNS for discovery, it creates the needed SSH tunnels between machines transparently. Each machine runs a small server that handles the attach/detach and additional ports.


They provide easy instructions to install on mac, windows and many versions of linux.


Issues: I'm not sure I fully understand the authentication and the protection of various ports. The firewall should help a bit, but I need to look more into the configs.

I also think using XMPP or some other common protocol for the machine-to-machine communication would have been better.