November 18, 2013

Open URL from Sublime Text

I keep a lot of text files to track progress/notes on projects with a lot of URLs.  For some notes, it has too many URLs and it became a hassle to copy&paste in a browser to check the page.  I found this handy tool for the purpose:

I tried on Mac and Windows -- and it works quite well. 

The installation steps are straight forward and well explained -- but I'm just entering the steps here as a note to myself.  You'll need GIT client for your OS to follow below step.

For Windows:
  1. Open Sublime Text
  2. Press CTRL+`
  3. Copy and paste (for Sublime Text 2) this (see
    import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( '' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')
  4. Restart Sublime Test
  5. Select from menu, Preferences -> Browser Packages.  This will open a folder -- for my case, it is "C:\Users\kkim\AppData\Roaming\Sublime Text 2\Packages"
  6. Open cmd in that folder (or move to that directory)
  7. Run git command (see the above open-url github page):
    git clone --branch st2
  8. Restart Sublime Text.
Use CTRL-u or ALT-double click on URL in text file to open the web page using default browser.

November 16, 2013

Trying ApacheDS

I only had a few times to use LDAP in the past, and now I need to explore some of the features in ApacheDS.  I'm putting some notes here on installation and using it.  The environment used here is CentOS for server, Windows 7 for client, both are 64 bits.

There are mainly two open source LDAP servers:

For installing Apahce DS on CentOS, download RPM from here:

Below is install/setup process:

-bash (1025) $ rpm -qpl apacheds-2.0.0-M15-x86_64.rpm
sudo ln -s /etc/init.d/apacheds-2.0.0_M15-default /etc/init.d/apacheds 
sudo chkconfig apacheds on
sudo service apacheds start

ApacheDS failed to start. In the log file, it showed that it can't locate java executable.  Modify /opt/apacheds-2.0.0_M15/conf/wrapper.conf
to set '' :

# Path to java executable

And use LDAP client to connect to port 10389, no authentication.  LDAP instance files are located at: /var/lib/apacheds-2.0.0_M15/

 LDAP client software

Microsoft Active Directory Explorer
Apache Directory Studio
LDAP Admin

Since I'm using ApacheDS, I want to try Apache Directory Studio here. Here is the screenshot from the site:

If you use this software and just want to test LDAP locally, there is no need to install separeate ApacheDS.  Studio comes with ApacheDS, and you can set up local LDAP servers.

Some readings

MS Strategy for Lightweight Directory Access Protocol (LDAP)

November 1, 2013