<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>gragusa's things</title>
	<atom:link href="http://gragusa.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gragusa.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sat, 13 Sep 2008 19:50:26 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='gragusa.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/e57f98bba8bba25d70e6fac1fe5b55e9?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>gragusa's things</title>
		<link>http://gragusa.wordpress.com</link>
	</image>
			<item>
		<title>Strip JSTOR first page</title>
		<link>http://gragusa.wordpress.com/2008/09/13/strip-jstor-first-page/</link>
		<comments>http://gragusa.wordpress.com/2008/09/13/strip-jstor-first-page/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 19:40:51 +0000</pubDate>
		<dc:creator>gragusa</dc:creator>
				<category><![CDATA[Apple Script]]></category>

		<guid isPermaLink="false">http://gragusa.wordpress.com/?p=6</guid>
		<description><![CDATA[This simple apple script will strip the first page of a jstor document. It requires Adobe Acrobat to be installed on your machine to run. Copy it in the script editor, save it as an application, and then add it to the Finder as a button. 
on run
	tell application "Finder"
		if selection is {} then
			quit
		else
			set finderSelection [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gragusa.wordpress.com&blog=2099579&post=6&subd=gragusa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This simple apple script will strip the first page of a jstor document. It requires Adobe Acrobat to be installed on your machine to run. Copy it in the script editor, save it as an application, and then add it to the Finder as a button. </p>
<p><code>on run<br />
	tell application "Finder"<br />
		if selection is {} then<br />
			quit<br />
		else<br />
			set finderSelection to selection as alias list<br />
		end if<br />
	end tell<br />
	deletepage(finderSelection)<br />
end run<br />
</code></p>
<p><code><br />
on open (theList)<br />
	deletepage(theList)<br />
end open<br />
</code></p>
<p><code><br />
on deletepage(listOfAliases)<br />
	repeat with eachitem in listOfAliases<br />
		tell application "Adobe Acrobat Professional"<br />
			activate<br />
			open eachitem<br />
			set Doc_Ref to the front document<br />
			delete first page<br />
			close Doc_Ref saving yes<br />
		end tell<br />
	end repeat<br />
end deletepage<br />
</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gragusa.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gragusa.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gragusa.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gragusa.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gragusa.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gragusa.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gragusa.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gragusa.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gragusa.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gragusa.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gragusa.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gragusa.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gragusa.wordpress.com&blog=2099579&post=6&subd=gragusa&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gragusa.wordpress.com/2008/09/13/strip-jstor-first-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65adf361b275e979436c76ca318ae709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gragusa</media:title>
		</media:content>
	</item>
		<item>
		<title>TextMate Emacs-like indentation (for R files)</title>
		<link>http://gragusa.wordpress.com/2007/11/11/textmate-emacs-like-indentation-for-r-files/</link>
		<comments>http://gragusa.wordpress.com/2007/11/11/textmate-emacs-like-indentation-for-r-files/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 09:04:41 +0000</pubDate>
		<dc:creator>gragusa</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://gragusa.wordpress.com/2007/11/11/textmate-emacs-like-indentation-for-r-files/</guid>
		<description><![CDATA[If you use OS X, TextMate is hands down the best editor available for this platform. It integrate perfectly with the OS X environment. While the Project Window is probably the greatest thing about TextMate for the everyday user, its extensibility is what makes it a wonderful companion in editing.
The biggest complain I have about [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gragusa.wordpress.com&blog=2099579&post=3&subd=gragusa&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you use OS X, <a href="http://macromates.com/">TextMate</a> is hands down the best editor available for this platform. It integrate perfectly with the OS X environment. While the Project Window is probably the greatest thing about <a href="http://macromates.com/">TextMate</a> for the everyday user, its extensibility is what makes it a wonderful companion in editing.</p>
<p>The biggest complain I have about TextMate is that it does not handle indentation very well. I write a lot of <a href="http://www.r-project.org/">R</a> code and I am used to the indentation provided by <a href="http://ess.r-project.org/" title="ess">ess</a> (Emacs Speak Statistics).  Frustrated, I decided to do something about it. After looking for option I realized that I could combine the feature of Emacs with those of TextMate to improve indentation. In practice I was able to use emacs (with ess) as beckend for the indentation. If you want to try  follow the following steps:</p>
<blockquote><p>1. Install ess (Emacs Speak Statistics) from <a href="http://ess.r-project.org" title="ess" target="_blank">http://ess.r-project.or </a> in /usr/share/emacs/site-lisp;</p>
<p>2. In TextMate go to Bundles|Bundle Editor|Show Bundle Editor&#8230;</p>
<p>3. Create a new command, say Tidy</p>
<p>4.  Add the following script:<br />
<code><br />
#!/usr/bin/perl<br />
my $in;<br />
my $now = "tidyRcode";<br />
my $file = "/tmp/tmptx_${now}.R";<br />
my $eb=$ENV{'TM_BUNDLE_SUPPORT'};<br />
open FILE, "&gt;$file" or die "unable to open $file $!";<br />
while () {<br />
print FILE $_;<br />
}<br />
close(FILE);<br />
`emacs -batch --eval "(require 'ess)" ${file} --eval '(indent-region (point-min) (point-max) nil)' -f ess-fix-miscellaneous -f save-buffer &amp;&gt; /dev/null`;<br />
my $in = `cat ${file}`;<br />
print $in;</code></p>
<p>5. Select the following options:</p>
<ul>
<li>Input: Selected Text or Document;</li>
<li>Output: Replace Selected Text;</li>
<li>Key Equivalent: Shift+Cmd+H;</li>
<li>Scope Selector: source.r</li>
</ul>
<p>You can see the picture below with my setting</p>
<p align="center"><a href="http://gragusa.files.wordpress.com/2007/11/picture-4.png" title="TextMate Emacs-like indentation (for R files)"><img src="http://gragusa.files.wordpress.com/2007/11/picture-4.thumbnail.png" alt="TextMate Emacs-like indentation (for R files)" /></a></p>
</blockquote>
<p align="left">Now you are ready to go. While you are editing R code, simply select and press Shift+Cmd+H and you will see your code&#8230;.the ess way.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gragusa.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gragusa.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gragusa.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gragusa.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gragusa.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gragusa.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gragusa.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gragusa.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gragusa.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gragusa.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gragusa.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gragusa.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gragusa.wordpress.com&blog=2099579&post=3&subd=gragusa&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gragusa.wordpress.com/2007/11/11/textmate-emacs-like-indentation-for-r-files/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/65adf361b275e979436c76ca318ae709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gragusa</media:title>
		</media:content>

		<media:content url="http://gragusa.files.wordpress.com/2007/11/picture-4.thumbnail.png" medium="image">
			<media:title type="html">TextMate Emacs-like indentation (for R files)</media:title>
		</media:content>
	</item>
	</channel>
</rss>