Friday, May 30, 2014

jpeg to pdf in mac

iPubSoft PDF Creator - Free for 5 jpegs. If you have more than 5 then create multiple pdfs and combine them using below software.
Combine PDFs - Free for first 1000 pages.

Thursday, April 17, 2014

Sublime : Open CSV in Open Office Excel

Create File Default/open_in_open_office
place below contents

import sublime, sublime_plugin, subprocess, os
class OpenInOpenOfficeCommand(sublime_plugin.TextCommand):

def run(self, edit):
if self.view.file_name():
os.chdir("/Applications/OpenOffice.app/Contents/program")
subprocess.Popen(["./soffice", self.view.file_name()])

def is_visible(self):
return self.view.file_name() and (self.view.file_name()[-4:] == ".csv")


Update File Default->Context.sublime-menu
{ "command": "open_in_open_office", "caption": "Open in Open Office" }
references
http://stackoverflow.com/questions/16147073/adding-custom-menus-in-sublime-text http://stackoverflow.com/questions/636561/how-can-i-run-an-external-command-asynchronously-from-python http://stackoverflow.com/questions/431684/how-do-i-cd-in-python https://docs.python.org/2/library/subprocess.html

Monday, January 13, 2014

Print sqls executed on MySQL server to log

To print sqls executed on MySQL server to a log, set the command line option while starting the MySQL server.
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini" --general-log=1 --general-log-file="c:\mysql.log"