Fork me on GitHub
AutoVPN: auto connect VPN if network is active and reconnect if VPN connection drops
01. Jan. 2012 at 21:00 written under privacy, english

After unsuccessful try on reddit.com, someone pointed me to a Python script that almost did what I wanted. Changed it a bit (works only with NetworkManager 0.9.x branch) and got: https://gist.github.com/1547663

Usage

First parameter to script is VPN connection name in NetworkManager and second are comma separated names of networks that should be ignored (using VPN connection at home is useless).

  • clone gist somewhere (eg. git clone git://gist.github.com/1547663.git /home/user/autovpn/)
  • add to /etc/rc.local: python /home/user/autovpn/autovpn.py "myvpn" 'Auto homenetwork,Auto worknetwork' > /var/log/autovpn.log&
  • reboot :-)
Read and Post Comments
Export content from Chromium History
19. Nov. 2011 at 22:30 written under export, chromium, english

Since http://ietherpad.com is down and I was notified all data was lost, this ruined my day, since I was already planning for past few weeks to write a script that would do daily backups.

There is bright future however. I am migrating to http://titanpad.com, wrote backup script in advance, and also managed to get some data from chrome cache.

Here are the steps:

  • on linux, figure out which history Index are you interested in: grep -R ietherpad ~/.chromium/Default/*
  • open it: sqlite3 ~/.chromium/Default/HistoryIndex2011-11
  • find your page and retrieve data: select * from pages_content where c0url like %ietherpad%
Read and Post Comments
Products.TinyMCE 1.3 beta 1 release
24. Oct. 2011 at 09:10 written under python, release, tinymce, plone, english

Installation

Changelog

Detailed changelog is long, (if you are interested) read following.

Deliverables

  • tinymce version upgrade 3.2.7 (2009) to 3.4.3 (2011)
  • IE9 support (implicitly fixed by previous line)
  • Dexterity support
  • Plone 3 and 4 compatible
  • rewritten Image and Link plugins (now named as plonebrowser) with jQuery
  • configurable shortcuts in browser plugin
  • GS migration
  • JavaScript compressor
  • KSS is gone
  • tested on opera/chrome/firefox/IE7/IE8/IE9
  • split tinymce project to a fork of github.com/tinymce/tinymce/

Known issues

  • editing existing link on image does not recognize current link
  • few IE7 design glitches

If this work is helpful to you, please contribute to my trip to PloneConf2011

Read and Post Comments
GSOC #3: TinyMCE improvements for Plone
08. Aug. 2011 at 00:20 written under python, tinymce, plone, english

Wow, a lot has happened since my last blog post. Highlight of the July being the Sauna Sprint 2011!

/images/046_groupphoto.jpg

Tom Gross worked on improving TinyMCE integration with JQuery plugin, javascript combiner and compressor. Now plain Plone 4 production site has 1/3 less requests in edit mode.

Kai Lautaportti refactored ploneimage.js from stratch with JQuery, no globals, documentation and jslint.

Roel Bruggink was really helpful with improving user stories and overall experience.

Also thanks to Peter Čuhalev for work on amazing redesign of image/link browser dialogs. His work was kindly sponsored by Hexagon IT, you guys rock! If you do like his contribution, it's best to offer him more proper open source craziness.

Changelog:

  • pluggable (ZCA) shortcuts in browser dialog [iElectric]
  • livesearch is now actually usable in browser dialog [iElectric]
  • provide JQuery in plugins [iElectric]
  • various bugfixes from tinymce upgrade [iElectric]
  • refactor ploneimage to use JQuery and not fail at all javascript caveats, satisfy jslint, docstrings [dokai]
  • properly use plone.app.imaging [iElectric + dokai]
  • configurable thumbnails for in browser dialog [iElectric]
  • json views return correct content type [iElectric]
  • JQuery plugin, compressor and javascript combiner [tomgross]
  • UX improvements in browser dialog [iElectric]
  • improved upgrade procedure [tomgross + dokai]
  • fixed #10803 [iElectric]
/images/046_dialog.png /images/046_thumbs.png

I plan to provide following (under GSOC section) until the end of GSOC2011 (or a bit later, if time bites me): http://ie.ietherpad.com/61

Other features may be implemented somewhat in the future, don't hesitate to contact me if you have a need to prioritize. As a reminder, changes to be merged in svn trunk are compatible with Plone 4.1+, mainly for depending on plone.app.imaging thumbnail generation.

Release is coming soon, I will be rolling out public beta sometime in next week. Feedback appreciated.

I'd like to thank again sponsors for my last years Sauna Sprint trip, it was an important stepping stone. This year was twice more amazing, woooohoooo for Sauna Sprint 2013!

Read and Post Comments
GSOC #2: TinyMCE improvements for Plone
11. Jul. 2011 at 23:55 written under python, tinymce, plone, english

University was quite successfully killing my overall productivity. Past week was grand finale, so I'm completely back to TinyMCE and Plone.

For few past weeks I was working on upgrading TinyMCE to version 3.4.3 (Plone currently uses version back from 2009). Fully automated upgrade procedure is now as easy as running a shell script. Upgrade was twice (or more) as painful as I originally anticipated. During upgrade many walls were hit and I questioned the whole approach. The conclusion is more or less: this is not maintainable. Few thoughts:

  • we maintain separate branch from TinyMCE guys and make changes directly into the core -- correct approach would be to merge important changes upstream and keep our plugins separate (although this is near to impossible with current TinyMCE architecture)
  • every Plone change to TinyMCE should be commented (explained atleast briefly) and noted where it starts and ends
  • I created github fork of TinyMCE to keep merging easier. It will brings a little bit painful development, but that can be solved.

Mockups for browser dialog are finished! I'm quite satistifed with the result: screenshots. Following things were kept in mind while redesigning the interface, to keep it more inituitive:

  • elaborate icons
  • separate shortcuts and link types (also add explicit "internal" link intead of clicking "home")
  • more clear idea that "current folder" is a place where uploaded file will land
  • image thumbnails
  • less fragments of window to make it less confusing
  • few new features like external image upload

Until the midterm evaluations (15. July) I will try to get new design converted into HTML/CSS ready for backend changes and merge upgraded TinyMCE to github. Would love to hear comments on redesign, what can be further improved?

PS: Without Vim as my "battle with text" ultimate tool, the job would be a suicide.
PPS: I'm participating at Sauna Sprint 2011, which will be an important week for the project, you should join while there is space left ;)
PPPS: Thanks for all the ideas around improvements, I will prioritize report what's being worked on!
Read and Post Comments