<?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/"
	>

<channel>
	<title>Blog.Project13.pl &#187; tip</title>
	<atom:link href="http://www.blog.project13.pl/index.php/tag/tip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.project13.pl</link>
	<description>The Blog of a Coder</description>
	<lastBuildDate>Sun, 05 Feb 2012 02:28:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>git-hacking: pre-commit hook and custom command</title>
		<link>http://www.blog.project13.pl/index.php/fun/1076/git-hacking-pre-commit-hook-and-custom-command/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/1076/git-hacking-pre-commit-hook-and-custom-command/#comments</comments>
		<pubDate>Sun, 21 Nov 2010 02:07:39 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[terminal heroes]]></category>
		<category><![CDATA[#eclipse]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[xsolve]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=1076</guid>
		<description><![CDATA[As my team is using a kinda weird source eclipse code formatter setup, that other IDEs can&#8217;t emulate in 100% I sometimes found myself committing in a file with only a few changed spaces. Of course, I could use &#8220;external-formatter&#8221; plugins etc but that&#8217;s no good. Running eclipse&#8217;s formatter each time I want to format [...]]]></description>
			<content:encoded><![CDATA[<p>As my team is using a kinda weird source eclipse code formatter setup, that other IDEs can&#8217;t emulate in 100% I sometimes found myself committing in a file with only a few changed spaces. Of course, I could use &#8220;external-formatter&#8221; plugins etc but that&#8217;s no good. Running eclipse&#8217;s formatter each time I want to format my source (_very_ often) proved to be too slow and really getting on my nerves.</p>
<p>So&#8230; Since I&#8217;ve started using <strong>git</strong>-svn at work, I do have an possibility to make things better now! The answer lies in client-side-<strong>hooks</strong> and <strong>git aliases</strong> (&#8220;custom commands&#8221;). First let&#8217;s write this as an simple bash script, that we&#8217;ll locate in the <strong>.git/hooks/</strong> folder:<br />
<script src="https://gist.github.com/708972.js?file=gistfile1.sh"></script> It&#8217;s a fairly simple script, so I wont bore you explaining it in detail &#8211; if in doubt, feel free to ask. We only need to place this script as &#8220;<strong>.git/hooks/pre-commit</strong>&#8221; and make it executable and git will take care of the rest for us. Oh and in case you&#8217;re wondering where that <strong>org.eclipse.jdt.core.prefs</strong> came from. It&#8217;s created by eclipse into the .settings folder when you check some option to &#8220;use formatter per project&#8221; &#8211; that&#8217;s the only time I had to fire up and click around in eclipse to get it&#8217;s formatter running &#8220;headless&#8221;. Ok, let&#8217;s check if it works&#8230; <script src="https://gist.github.com/708982.js?file=gistfile1.java"></script><br />
<script src="https://gist.github.com/708976.js?file=gistfile1.sh"></script> <script src="https://gist.github.com/708981.js?file=gistfile1.java"></script><br />
Yup, you can agree or not with the formatting rules &#8211; but what matters is that the whole team decided on it and that we keep it consistent throughout the whole project. This hook will definitely help with this. :-)  Step two for me was changing this into a git command, so that I wouldn&#8217;t launch eclipse each time I just do some quick local commiting. The solution is to drop the hook idea (although it&#8217;s quite nice) and create an custom git command. We do this by doing an alias like that:</p>
<pre>git config --global alias.eclipse-formatter '!~/git-hook-eclipse-formatter'</pre>
<p>The <strong>!command </strong>alias<strong> </strong>support is with us in git since 1.5.0 and it enables us to launch any program/script as an git command. Great, just what I wanted! Let&#8217;s now see what this command really did:</p>
<p><script src="https://gist.github.com/708977.js?file=gistfile1.sh"></script><br />
As you can see, adding an alias is as simple as adding it to your<strong> ~/.gitconfig</strong> or, if you want to setup the alias &#8220;per project&#8221;, to <strong>.git/config</strong> &#8211; pretty cool, ay? Also, this command will be included in bash-autocompletition suggestions! :-)</p>
<p>That&#8217;s it for today&#8230; <em>happy hacking!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/1076/git-hacking-pre-commit-hook-and-custom-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Git@JavaCamp: fix-1: When does git &#8220;see&#8221; an rename explicitly?</title>
		<link>http://www.blog.project13.pl/index.php/fun/1069/gitjavacamp-fix-1-when-does-git-see-an-rename-explicitly/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/1069/gitjavacamp-fix-1-when-does-git-see-an-rename-explicitly/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 01:37:56 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git add]]></category>
		<category><![CDATA[git move]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[move]]></category>
		<category><![CDATA[mv]]></category>
		<category><![CDATA[pitfall]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=1069</guid>
		<description><![CDATA[Yup, it&#8217;s time for two follow ups to problems we encountered during my life examples. Why didn&#8217;t git see our &#8220;rename&#8221; as rename? Although yes it is true just as I said during the presentation that &#8220;git mv is just an alias&#8221; I&#8217;ve forgotten about that it&#8217;s an little bit bigger alias: git mv oldname [...]]]></description>
			<content:encoded><![CDATA[<p>Yup, it&#8217;s time for two follow ups to problems we encountered during my life examples. Why didn&#8217;t git see our &#8220;rename&#8221; as rename? Although yes it is true just as I said during the presentation that &#8220;git mv is just an alias&#8221; I&#8217;ve forgotten about that it&#8217;s an little bit bigger alias:</p>
<pre><code>
git mv oldname newname
        =
mv oldname newname
git add newname
git rm oldname</code></pre>
<p>Note that last line, git rm oldname is what we fotgot to do in our example, thus git was seeing an just the &#8220;new file&#8221; version of our operation. One line wrong, yet very important :-) Let&#8217;s check if it works this way:</p>
<p><code>[ktoso@homunculus test]$ ls<br />
jeden  typescript<br />
[ktoso@homunculus test]$ git init .<br />
Reinitialized existing Git repository in /home/ktoso/test/.git/<br />
[ktoso@homunculus test]$ cat jeden<br />
drugi pliczek<br />
[ktoso@homunculus test]$ echo 'dwadwa' &gt; dwa<br />
[ktoso@homunculus test]$ cat dwa<br />
dwadwa<br />
[ktoso@homunculus test]$ git add .<br />
[ktoso@homunculus test]$ git commit -m 'dodanie ich'<br />
[master (root-commit) a430782] dodanie ich<br />
2 files changed, 2 insertions(+), 0 deletions(-)<br />
create mode 100644 dwa<br />
create mode 100644 jeden<br />
create mode 100644 typescript<br />
[ktoso@homunculus test]$ git mv<br />
dwa         .git/       jeden       typescript<br />
[ktoso@homunculus test]$ <strong>git mv jeden nowy-jeden</strong><br />
[ktoso@homunculus test]$ git status<br />
# On branch master<br />
# Changes to be committed:<br />
#   (use "git reset HEAD &lt;file&gt;..." to unstage)<br />
#<br />
<strong>#       renamed:    jeden -&gt; nowy-jeden</strong><br />
#<br />
[ktoso@homunculus test]$ mv<br />
dwa         .git/       nowy-jeden  typescript<br />
[ktoso@homunculus test]$ <strong>mv dwa nowe-dwa</strong><br />
[ktoso@homunculus test]$ <strong>git add nowe-dwa</strong><br />
[ktoso@homunculus test]$ <strong>git rm dwa</strong><br />
rm 'dwa'<br />
[ktoso@homunculus test]$ git status<br />
# On branch master<br />
# Changes to be committed:<br />
#   (use "git reset HEAD &lt;file&gt;..." to unstage)<br />
#<br />
#       <strong>renamed:    dwa -&gt; nowe-dwa</strong><br />
#       renamed:    jeden -&gt; nowy-jeden<br />
#<br />
[ktoso@homunculus test]$ echo "problem Solved... :-)"<br />
</code>problem Solved&#8230; :-)</p>
<p>Yup, it actually detects the renames proppery. Even more, it would detect an &#8220;copy&#8221; action (this works even easier):</p>
<p><code>[ktoso@homunculus test]$ <strong>cp nowy-jeden nowy-jeden-jeden</strong><br />
[ktoso@homunculus test]$ <strong>git add .</strong><br />
[ktoso@homunculus test]$ git status<br />
# On branch master<br />
# Changes to be committed:<br />
#   (use "git reset HEAD &lt;file&gt;..." to unstage)<br />
#<br />
#       renamed:    dwa -&gt; nowe-dwa<br />
#       <strong>copied:     jeden -&gt; nowy-jeden</strong><br />
#       renamed:    jeden -&gt; nowy-jeden-jeden<br />
#       modified:   typescript<br />
#</code></p>
<p>I&#8217;m already converting all the presentations to MP4 files and they&#8217;ll be online soon I hope :-) Then I&#8217;ll also write an usual &#8220;review&#8221; as I always do with any confernce/meering. For now just a quick summary: An amazing attandee count, nice presentations and an very very nice crowd :-) Thanks a lot for all the talks, but let&#8217;s wair for my &#8220;review&#8221; with more informations about JC5&#8230; :-) (Oh, yes we&#8217;re allready planing JC6&#8230; ;-))</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/1069/gitjavacamp-fix-1-when-does-git-see-an-rename-explicitly/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Grails way #0: Simple Twitter TagLib</title>
		<link>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/#comments</comments>
		<pubDate>Tue, 25 May 2010 14:33:11 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=664</guid>
		<description><![CDATA[Let&#8217;s skip the introduction of taglibs, (since anyone knows what they are), and get to the code really quickly! If you&#8217;ve seen netbeans.edu.pl you probably noticed the twitter part on the right. As twitter&#8217;s API is really simple to use, one could implement this on ones own, but why do so if we&#8217;re in the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.blog.project13.pl/wp-content/uploads/2010/05/twitternbexample.png"><img class="alignleft size-medium wp-image-679" title="twitternbexample" src="http://www.blog.project13.pl/wp-content/uploads/2010/05/twitternbexample-99x300.png" alt="" width="99" height="300" /></a>Let&#8217;s skip the introduction of taglibs, (since anyone knows what they are), and get to the code really quickly! If you&#8217;ve seen netbeans.edu.pl you probably noticed the twitter part on the right. As twitter&#8217;s API is really simple to use, one could implement this on ones own, but why do so if we&#8217;re in the Grails -&gt; Groovy -&gt; Java world, where there are amazing libraries for most things.</p>
<p>I used 2 libs to create this tag:</p>
<ul>
<li><a href="http://twitter4j.org/en/index.jsp" onclick="urchinTracker('/outgoing/twitter4j.org/en/index.jsp?referer=');">twitter4j</a> &#8211; a very good  twitter client library (java, even works on android)</li>
<li><a href="http://github.com/mzsanford/twitter-text-java" onclick="urchinTracker('/outgoing/github.com/mzsanford/twitter-text-java?referer=');">twitter-text-java</a> &#8211; the official library for parsing plaintext to produce valid @ and # links, more information about it can be found on github or <a href="http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html" onclick="urchinTracker('/outgoing/engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html?referer=');">http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html</a></li>
</ul>
<p>Anyways, first the source of the actuall taglib. We simply call the methods, get the response fill out the content of the tag with the variables we got:</p>
<div class="geshi no groovy">
<div class="head">package pl.project13</div>
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import com.twitter.Autolink</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co2">import twitter4j.*</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">class</span> TweetsTagLib <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">static</span> namespace <span class="sy0">=</span> <span class="st0">&#39;tweets&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="coMULTI">/**</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp;* Performs an twitter search and displays the result as an</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp; &nbsp;*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">def</span> fromSearch <span class="sy0">=</span> <span class="br0">&#123;</span>attrs, body -<span class="sy0">&amp;</span>gt<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Twitter twitter <span class="sy0">=</span> <span class="kw2">new</span> TwitterFactory<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getInstance</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Query query <span class="sy0">=</span> <span class="kw2">new</span> Query<span class="br0">&#40;</span>attrs.<span class="me1">query</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; QueryResult result <span class="sy0">=</span> twitter.<span class="me1">search</span><span class="br0">&#40;</span>query<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">def</span> tweetz <span class="sy0">=</span> result.<span class="me1">tweets</span>.<span class="me1">subList</span><span class="br0">&#40;</span><span class="nu0">0</span>, <span class="kw3">Integer</span>.<span class="me1">parseInt</span><span class="br0">&#40;</span>attrs.<span class="kw5">count</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; tweetz.<span class="kw5">each</span> <span class="br0">&#123;</span>Tweet tweet -<span class="sy0">&amp;</span>gt<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; Autolink parser <span class="sy0">=</span> <span class="kw2">new</span> Autolink<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; tweet.<span class="me1">text</span> <span class="sy0">=</span> parser.<span class="me1">autoLink</span><span class="br0">&#40;</span>tweet.<span class="me1">text</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; pageScope.<span class="me1">tweet</span> <span class="sy0">=</span> tweet</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; out <span class="sy0">&amp;</span>lt<span class="sy0">;</span> <span class="sy0">&amp;</span>lt<span class="sy0">;</span> body<span class="br0">&#40;</span>tweet<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="co1">//some other stuff&#8230;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Super easy, ain&#8217;t it? More stuff <a href="http://www.grails.org/doc/1.3.x/guide/single.html#6.3%20Tag%20Libraries" onclick="urchinTracker('/outgoing/www.grails.org/doc/1.3.x/guide/single.html_6.3_20Tag_20Libraries?referer=');">about taglibs in grails can be found here</a>. Now let&#8217;s go over to our view and see how to use this taglib &#8211; it&#8217;s (once again) amazingly simple:</p>
<div class="geshi no plain">
<ol>
<li class="li1">
<div class="de1">&lt;g :set var=&quot;query&quot; value=&quot;netbeans&quot;/&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;h3&gt;Twitter #${query}&lt;/h3&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;div id=&quot;twitter&quot; class=&quot;menubox&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;ul&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;tweets :fromSearch query=&quot;#${query}&quot; count=&quot;8&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &lt;li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;http://www.twitter.com/${it.fromUser}&quot; target=&quot;_blank&quot; class=&quot;twitter-author&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;img src=&quot;${it.profileImageUrl}&quot; alt=&quot;${it.fromUser}&quot; title=&quot;${it.fromUser}&quot; style=&quot;float:left; padding:2px; width:25px; height:25px&quot;/&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; %{&#8211;${it.fromUser}:&#8211;}%
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; ${it.text}&lt;br /&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;span style=&quot;font-size:0.75em&quot; class=&quot;twitter-date&quot;&gt;${it.createdAt}&lt;/span&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/tweets&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;/ul&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &amp;#187;&amp;nbsp;&lt;a href=&quot;http://twitter.com/#search?q=${query}&quot; target=&quot;_blank&quot;&gt;więcej&lt;/a&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/div&gt;</div>
</li>
</ol>
</div>
<p>All we need to do here, is set an variable thanks to some nice GSP tag, and then use it to query and echo our data the taglib is supplying us with. Note that the <strong>tweets:fromSearch</strong> acts like an foreach &#8211; no need for any extra loops here :-) That&#8217;s just a very simple tag but it&#8217;s quite nice to use, hope you enjoied it and will be more than happy to see the sources of netbeans.edu.pl published on github soon&#8230; :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/664/the-grails-way-0-simple-twitter-taglib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YES! Native Zen coding in Intellij IDEA EAP 9.0.2</title>
		<link>http://www.blog.project13.pl/index.php/fun/465/yes-native-zen-coding-in-intellij-eap-9-0-2/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/465/yes-native-zen-coding-in-intellij-eap-9-0-2/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 21:30:52 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[IDEA]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[webdeveloper]]></category>
		<category><![CDATA[zen]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=465</guid>
		<description><![CDATA[Zen points directly to the human heart, see into your nature and become Buddha. - Hakuin Ekaku (1685–1768) For those who don&#8217;t know about zen coding (where have you been guys?) here&#8217;s a little sample: Instead of writing: &#60;form class="form-comment" id="comment"&#62; &#60;fieldset&#62; &#60;input id="myid" name="name" type="" /&#62; &#60;input onclick="hideMe()" type="" /&#62; &#60;/fieldset&#62; &#60;/form&#62; You write [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<p style="text-align: right;"><em><strong>Zen points directly to the human heart,<br />
see into your nature and become Buddha.</strong><br />
</em>- Hakuin Ekaku (1685–1768)</p>
</blockquote>
<p>For those who don&#8217;t know about zen coding (where have you been guys?) here&#8217;s a little sample:</p>
<p>Instead of writing:<br />
<code>&lt;form class="form-comment" id="comment"&gt;<br />
&lt;fieldset&gt;<br />
&lt;input id="myid" name="name" type="" /&gt;<br />
&lt;input onclick="hideMe()"</code><code> type=""</code><code> /&gt;<br />
&lt;/fieldset&gt;<br />
&lt;/form&gt;</code></p>
<p>You write<br />
<code><br />
form.form-comment#comment&gt;fieldset&gt;input#myid[name=name]&gt;input[onclick=hideMe()]</code></p>
<p>and hit [TAB].</p>
<p><em><strong>To understand zen, you must understand yourself. </strong></em>(yet I also strongly suggest watching <a href="http://vimeo.com/7405114" onclick="urchinTracker('/outgoing/vimeo.com/7405114?referer=');">this video</a>)<em><strong><br />
</strong></em></p>
<p>Links:<a href="http://confluence.jetbrains.net/display/IDEADEV/Maia+EAP" onclick="urchinTracker('/outgoing/confluence.jetbrains.net/display/IDEADEV/Maia+EAP?referer=');"></a><br />
<a href="http://confluence.jetbrains.net/display/IDEADEV/Maia+EAP" onclick="urchinTracker('/outgoing/confluence.jetbrains.net/display/IDEADEV/Maia+EAP?referer=');">http://confluence.jetbrains.net/display/IDEADEV/Maia+EAP</a> &#8211; IntelliJ IDEA Early Access Program<br />
<a href="http://code.google.com/p/zen-coding/" onclick="urchinTracker('/outgoing/code.google.com/p/zen-coding/?referer=');">http://code.google.com/p/zen-coding/</a> &#8211; zen coding website</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/465/yes-native-zen-coding-in-intellij-eap-9-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Almost) Automatically convert files into PDF</title>
		<link>http://www.blog.project13.pl/index.php/fun/285/almost-automatically-convert-files-into-pdf/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/285/almost-automatically-convert-files-into-pdf/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 00:56:55 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[terminal heroes]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=285</guid>
		<description><![CDATA[I&#8217;m learning Numerical Analysis right now and a friend of mine found some really nice PS files by dr Marian Bubek ( http://www.icsr.agh.edu.pl/~mownit/mownit.html ). I was really happy to see some *.ps but some people from my fellow students started complaining that they&#8217;d rather have pdf&#8217;s and not ghostscript files (who knows why they&#8217;d do..?). [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m learning Numerical Analysis right now and a friend of mine found some really nice PS files by dr Marian Bubek ( <a href="http://www.icsr.agh.edu.pl/~mownit/mownit.html" onclick="urchinTracker('/outgoing/www.icsr.agh.edu.pl/_mownit/mownit.html?referer=');">http://www.icsr.agh.edu.pl/~mownit/mownit.html</a> ). I was really happy to see some *.ps but some people from my fellow students started complaining that they&#8217;d rather have pdf&#8217;s and not ghostscript files <em>(who knows why they&#8217;d do..?)</em>. Anyways, they all had &#8220;manual&#8221; repetitious methods for converting the files &#8211; even uploading to somewebsite to have them converted over there &#8220;in the cloud&#8221;&#8230; I though of a slightly quicker and more efficient way, here it is, hope you&#8217;ll like it. Ah, there is One &#8220;non standard&#8221; requirement for this to work, you have to install <strong>cups-pdf</strong> :-)</p>
<div class="geshi no bash">
<div class="head">wget http://www.icsr.agh.edu.pl/~mownit/mownit.html -r &#8211;level 1 -A.ps &#8211;cut-dirs 4</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw2">mv</span> www.icsr.agh.edu.pl<span class="sy0">/*</span> .</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">rm</span> -rf www.icsr.agh.edu.pl<span class="sy0">/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span> <span class="kw2">file</span> <span class="kw1">in</span> `<span class="kw2">dir</span> -f <span class="sy0">*</span>` ; <span class="kw1">do</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw2">lpr</span> -P <span class="st0">&#39;cups-PDF&#39;</span> <span class="re1">$file</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw3">echo</span> <span class="st0">&quot;press enter when cups is done printing&#8230;&quot;</span> <span class="co0">#yeah, i got lazy here, one could watch lpq for changes etc.</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw2">read</span> oczekiwanie;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw2">mv</span> <span class="sy0">/</span>home<span class="sy0">/</span>ktoso<span class="sy0">/</span>Pulpit<span class="sy0">/</span>cups-pdf<span class="sy0">/</span>template.pdf .<span class="sy0">/</span><span class="re1">$file</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">done</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># ________________ </span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#&lt; Happy hacking! &gt;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &#8212;&#8212;&#8212;&#8212;&#8212;- </span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp; ^__^</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp; \ &nbsp;(oo)\_______</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(__)\ &nbsp; &nbsp; &nbsp; )\/\</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;||&#8212;-w |</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|| &nbsp; &nbsp; ||</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/285/almost-automatically-convert-files-into-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toggle Syntax Highlighting in vim</title>
		<link>http://www.blog.project13.pl/index.php/coding/159/syntax-highlighting-in-vim/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/159/syntax-highlighting-in-vim/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 15:42:14 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[webdeveloper]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=159</guid>
		<description><![CDATA[Just a quick vim tip today&#8230; Have you been coding/fixing stuff on the server over ssh using vim? I sure have, but was always wondering why the vim on my server wouldn&#8217;t highlight php&#8230; The solution is: :syntax on Whoa, 2 words, not 2 letters like usually! Thats pretty long for vim ain&#8217;t it? ;-)]]></description>
			<content:encoded><![CDATA[<p>Just a quick vim tip today&#8230; Have you been coding/fixing stuff on the server over ssh using vim? I sure have, but was always wondering why the vim on my server wouldn&#8217;t highlight php&#8230; The solution is:<strong><br />
</strong></p>
<p><strong>:syntax on</strong></p>
<p>Whoa, 2 words, not 2 letters like usually! Thats pretty long for vim ain&#8217;t it? ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/159/syntax-highlighting-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Terminal Heroes &#8211; 1 &#8211; mysql backup insert</title>
		<link>http://www.blog.project13.pl/index.php/coding/143/terminal-heroes-part-1/</link>
		<comments>http://www.blog.project13.pl/index.php/coding/143/terminal-heroes-part-1/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 20:39:15 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[terminal heroes]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=143</guid>
		<description><![CDATA[Just a quick note while dumping a 70MB database&#8230; ;-) Let&#8217;s say i got my database backup from phpmyadmin, compressed with gz (zip&#8217;s also fine), while getting the backup,even if it&#8217;s BIG ain&#8217;t really a problem, putting it into the database can be troublesome becouse timeout&#8217;s etc, especially if it&#8217;s a BIG file ;-) My [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note while dumping a 70MB database&#8230; ;-) Let&#8217;s say i got my database backup from phpmyadmin, compressed with gz (zip&#8217;s also fine), while getting the backup,even if it&#8217;s <strong>BIG</strong> ain&#8217;t really a problem, putting it into the database can be troublesome becouse timeout&#8217;s etc, especially if it&#8217;s a <strong>BIG</strong> file ;-) My tip here is:</p>
<p>Download the compressed backup<br />
Put it onto your target server, by FTP, SFTP or SCP, doesn&#8217;t really matter<br />
Launch SSH and use your terminal hero skillzorz:</p>
<p><code>cd where/i/put/the/file<br />
gunzip backup.sql.gz #or unzip backup.sql.zip<br />
mysql-u username -D database_name -pPASSWD &lt; backup.sql<br />
cowsay "data imported, yay!"</code></p>
<p>It&#8217;s pretty self explanatory I guess, and MUCH faster and more reliable than any other way of doing this :-)</p>
<p>My backup should finish downloading any second now, so&#8230; cya soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/coding/143/terminal-heroes-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

