Archive for the ‘Tools’ Category

NonProfitLocator.org Launched

screenshot of NonProfitLocator.org

I’ve been considering resurrecting Gigoit.org. In addition to finding people to donate items to, one of the essential features on the development roadmap for that site was finding nonprofit organizations that needed material donations.

It’s been a long time since I looked at that data, so to get a better handle on what was available and how it was structured I decided to build NonProfitLocator.org. At the moment It’s an early version, basically a minimum viable product that displays tax exempt and nonprofit information in an easy to read format, performs some comparisons on an organization’s data compared to others nearby, and allows you to find nonprofits in a geographic area.

I plan to further flesh the site out in the coming weeks with enhanced tools, paving the way to use this data with other projects.

Launch NetBeans when opening files in the MacOS X Finder

I recently switched from Open Komodo to NetBeans 7. What drove me absolutely nuts was the fact that I couldn’t drag and drop files onto the NetBeans application to have them open. Further complicating the issue, NetBeans does not use a standard file browser dialog so you cannot drag and drop onto that either.

Here is my work around. It allows you to drag and drop a single file, or group of files and have them open in NetBeans. I created an application with AppleScript that takes the dropped files and passes them to a shell command that opens netbeans. To use this you must first have NetBeans already launched. I keep this application sitting in my Dock right next the NetBeans icon.

You may need to edit the path to NetBeans if you are using a different version or location

The AppleScript

-- This AppleScript created by John Kramlich of http://www.johnkramlich.com
-- Modify it in anyway you see fit.
return -- not needed, but shows that the script stops here when "run"

on open of finderObjects -- "open" handler triggered by drag'n'drop launches
	repeat with i in (finderObjects) -- in case multiple objects dropped on applet
		
		set mypath to posix_path(i)
		
		do shell script "/Applications/NetBeans/NetBeans\\ 7.0.app/Contents/MacOS/netbeans --open " & mypath
		
	end repeat
	
	tell application "NetBeans 7.0"
		activate
	end tell
	
end open

on posix_path(mac_path)
	set mac_path to (mac_path as text)
	set root to (offset of ":" in mac_path)
	set rootdisk to (characters 1 thru (root - 1) of mac_path)
	tell application "Finder"
		if (disk (rootdisk as string) is the startup disk) then
			set unixpath to "/" & (characters (root + 1) thru end of mac_path)
		else
			set unixpath to "/Volumes:" & mac_path
		end if
	end tell
	set chars to every character of unixpath
	repeat with i from 2 to length of chars
		if item i of chars as text is equal to "/" then
			set item i of chars to ":"
		else if item i of chars as text is equal to ":" then
			set item i of chars to "/"
		else if item i of chars as text is equal to "'" then
			set item i of chars to "\\'"
		else if item i of chars as text is equal to "\"" then
			set item i of chars to "\\" & "\""
		else if item i of chars as text is equal to "*" then
			set item i of chars to "\\*"
		else if item i of chars as text is equal to "?" then
			set item i of chars to "\\?"
		else if item i of chars as text is equal to " " then
			set item i of chars to "\\ "
		else if item i of chars as text is equal to "\\" then
			set item i of chars to "\\\\"
		end if
	end repeat
	return every item of chars as string
end posix_path

The Icon

Download the Files