Posts Tagged ‘plugin’

Sublime Text 2 – rsync on save

// december 1st, 2011 // No Comments » // Development, plugin, Python

As I’m running an Ubuntu Server in a virtual machine as development test server and I develop on my local environment, I need to keep both repositories in sync.
Before, I shared the code on the development server to my local environment via NFS. The setup worked, but gave some complications with svn, and the auto mounting of the NFS-share after rebooting. So I started looking for a new way to keep all files in sync. I considered sharing via NFS the other way around, but that would make my test server very slow; all php files need to be loaded through NFS and all assets (images, css, javascript) too.
The easiest way to solve my problem was through the good old rsync. As I’m too lazy to run an rsync command every time before I want to load a page from my test-server, I wanted it to be done automatically when I saved a file.
As Sublime Text 2 is an awesome editor which supports plugins, I started surfing around looking for some examples which I then adapted for my own use..
This is the plugin I now use:

import sublime, sublime_plugin, subprocess

class RsyncOnSave(sublime_plugin.EventListener):
def on_post_save(self, view):

syncProject = “”"rsync -avz localpath remotepath &”"”
subprocess.call([syncProject],shell=True)

This code is put in a file named RsyncOnSave.py which is saved a folder named RsyncOnSave, in the Packages folder (for OSX thats: ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/). The plugin should automatically be loaded when you (re-)start Sublime Text.
localpath and remotepath obviously are the paths in your case. Note the ampersand at the end of the sync command, which makes sure your editor doesn’t freeze while the command is being executed.

Make sure you’ve put your public ssh-key in the authorized_keys on your server, so you don’t have to give your password when rsyncing.

WordPress plugin: Authentication

// juli 25th, 2010 // 46 Comments » // Cuvedev, Development, download, plugin, Wordpress

So, I finally submitted my first plugin to the WordPress plugin base.

It’s a plugin which add functionality to request visitors authentication before the website can be viewed. It doesn’t use HTTP Authentication, just php and html.
You can choose to use the WordPress authentication functionality to login, or give a password yourself.

Try it out, and give some feedback.

Link to Basic Authentication plugin

Screenshot:
options

 

– Update:

Now compatible with WordPress 3.3

Vrt Internetradio Boxee plugin

// april 12th, 2010 // 3 Comments » // Boxee, Development, klara, mnm, Python, radio 1, radio 2, radio vlaanderen, stubru, vrt

So, I finally finished my second Boxee plugin. This time I can call it a real plugin, there are options, lists and dialogs. Hooray!

The plugin is called “Vrt Internetradio”, and it basicly plays internet streams from the VRT (Vlaamse Radio- en Televisieomroeporganisatie).
The VRT  owns several radio stations and they provide streams to listen to them via the internet. I took the opportunity to use those to make a Boxee plugin so we all can play them with our beloved Boxee.

There’s not that much functionality, but I tried to keep the layout simple and tried to give a good user experience (up/down buttons to right controls and such).

Screenshots (click for larger picture) and download link are below , don’t hesitate to comment ¬†and help me improve the plugin.

The main screen:
The main screen

Info about a particular station and substations to play:
Info about a particular station and substations to play

Starting a radiostation:
Starting a radiostation

The options dialog:
The options dialog

The about dialog:
The about dialog

Download here

Boxee StuBru Plugin

// april 5th, 2010 // No Comments » // Cuvedev, script

So … I finally finished my first Boxee plugin. Funny tough, it’s non of my previously planned plugins.
Today I got the inspiration to make ¬†a small but handy plugin. Studio Brussel was airing “De zwaarste lijst”, a list of hard rock and metal music tonight, and I thought it would nice to listen to it with Boxee because it uses my Logitech Z-5500. ‘Nuff said right?

So here it is. It’s extremely basic, but it does what it was supposed to do, play stubru music.
Download and enjoy!

Download my stubru boxee plugin

Tested on Boxee Beta for OSX and Ubuntu.