<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US" xml:base="http://scribu.net/wp-atom.php">
	<title type="text">scribu » Util</title>
	<subtitle type="text">Cristi Burcă - WordPress Core contributor, plugin author and web developer</subtitle>

	<updated>2012-05-22T23:03:28Z</updated>

	<link rel="alternate" type="text/html" href="http://scribu.net" />
	<id>http://scribu.net/feed</id>
	

	<generator uri="http://wordpress.org/" version="3.4-beta4-20825">WordPress</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/scribu/util" /><feedburner:info uri="scribu/util" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
		<author>
			<name>scribu</name>
						<uri>http://scribu.net</uri>
					</author>
		<title type="html"><![CDATA[vim and the Ubuntu clipboard]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/scribu/util/~3/bbx7NK8i_ys/vim-and-the-ubuntu-clipboard.html" />
		<id>http://scribu.net/?p=1232</id>
		<updated>2011-10-15T01:05:18Z</updated>
		<published>2011-05-07T15:42:43Z</published>
		<category scheme="http://scribu.net" term="Util" /><category scheme="http://scribu.net" term="tutorial" />		<summary type="html"><![CDATA[Two of my friends have recently become vim fanatics. I played with vim a little before, but now I&#8217;ve made it my primary editor.

One thing that bugged me was that, by default, you are not able to copy text from vim into other applications in Ubuntu.]]></summary>
		<content type="html" xml:base="http://scribu.net/util/vim-and-the-ubuntu-clipboard.html">&lt;p&gt;Two of my friends have recently become vim fanatics. I played with vim a little before, but now I&amp;#8217;ve made it my primary editor.&lt;/p&gt;
&lt;p&gt;One thing that bugged me was that, by default, you are not able to copy text from vim into other applications in Ubuntu. To fix this, you just need to do:&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family:monospace;"&gt;sudo apt&lt;span style="color: #339933;"&gt;-&lt;/span&gt;get install vim&lt;span style="color: #339933;"&gt;-&lt;/span&gt;gnome&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then, you can visually select a block of text and yank it to the clipboard using the &lt;code&gt;"+y&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;To paste the contents of the clipboard into vim, you would use the &lt;code&gt;"+p&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;Source: &lt;a href="http://ubuntuforums.org/showthread.php?t=106262"&gt;http://ubuntuforums.org/showthread.php?t=106262&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/scribu/util/~4/bbx7NK8i_ys" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://scribu.net/util/vim-and-the-ubuntu-clipboard.html#comments" thr:count="7" />
		<link rel="replies" type="application/atom+xml" href="http://scribu.net/util/vim-and-the-ubuntu-clipboard.html/feed" thr:count="7" />
		<thr:total>7</thr:total>
	<feedburner:origLink>http://scribu.net/util/vim-and-the-ubuntu-clipboard.html</feedburner:origLink></entry>
		<entry>
		<author>
			<name>scribu</name>
						<uri>http://scribu.net</uri>
					</author>
		<title type="html"><![CDATA[Baseline Checker Bookmarklet]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/scribu/util/~3/2VjsGumicXE/baseline-checker-bookmarklet.html" />
		<id>http://scribu.net/?p=507</id>
		<updated>2012-01-20T21:29:18Z</updated>
		<published>2009-07-02T22:36:30Z</published>
		<category scheme="http://scribu.net" term="Util" /><category scheme="http://scribu.net" term="bookmarklet" /><category scheme="http://scribu.net" term="typography" /><category scheme="http://scribu.net" term="webdesign" />		<summary type="html"><![CDATA[Update: For your forking pleasure, check out the github repository. If you&#8217;re a web designer, you&#8217;re probably familiar with the typographical concept of &#8220;baseline rhythm&#8220;. While tackeling the problem on this site, all I could find was baseline rhytm calculators. Sure, that helps a little, but it wasn&#8217;t quite what I needed. So I wrote [...]]]></summary>
		<content type="html" xml:base="http://scribu.net/util/baseline-checker-bookmarklet.html">&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; For your forking pleasure, check out the &lt;a href="https://github.com/scribu/baseline-checker"&gt;github repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re a web designer, you&amp;#8217;re probably familiar with the typographical concept of &amp;#8220;&lt;a href="http://www.sitepoint.com/blogs/2007/04/30/typography-baseline-rhythm-deciphered/"&gt;baseline rhythm&lt;/a&gt;&amp;#8220;.&lt;/p&gt;
&lt;p&gt;While tackeling the problem on this site, all I could find was baseline rhytm calculators. Sure, that helps a little, but it wasn&amp;#8217;t quite what I needed. So I wrote this bookmarklet, creatively named &amp;#8220;Baseline Checker&amp;#8221;.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://img200.imageshack.us/img200/8310/hrbookmarklet.png" alt="screenshot" /&gt;&lt;/p&gt;
&lt;h4&gt;What it does&lt;/h4&gt;
&lt;p&gt;It draws equally spaced horizontal lines on top of a webpage. The position and the distance between the lines is calculated in reference to a particular element on that page.&lt;/p&gt;
&lt;p&gt;With it, you can see for yourself if the baseline is consistent or not.&lt;/p&gt;
&lt;h4&gt;How to use it&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&amp;#8220;Install&amp;#8221; the bookmarklet by dragging ( &lt;strong&gt;&lt;a href="javascript:(function(){if(typeof(baseline_checker_bookmarklet)=='function')return(baseline_checker_bookmarklet());js=document.createElement('script');js.type='text/javascript';js.src='http://scribu.net/tools/baseline-checker/load.js?v='+(Math.random());document.getElementsByTagName('head')[0].appendChild(js);})();"&gt;Baseline Checker&lt;/a&gt;&lt;/strong&gt; ) to your bookmarks menu.&lt;/li&gt;
&lt;li&gt;Go to a webpage and then click the bookmarklet.&lt;/li&gt;
&lt;li&gt;Click an element on the page.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Icon credit: &lt;a href="http://samrayner.com/archives/altfontprev/"&gt;Sam Rayner&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PS: You might also want to look at &lt;a href="http://fortes.com/2008/08/jmetronome-using-jquery-to-keep-typographic-rhythm/"&gt;jMetronome&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/scribu/util/~4/2VjsGumicXE" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://scribu.net/util/baseline-checker-bookmarklet.html#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://scribu.net/util/baseline-checker-bookmarklet.html/feed" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://scribu.net/util/baseline-checker-bookmarklet.html</feedburner:origLink></entry>
		<entry>
		<author>
			<name>scribu</name>
						<uri>http://scribu.net</uri>
					</author>
		<title type="html"><![CDATA[Link-uri fără diacritice în WordPress]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/scribu/util/~3/FTU2owLeQiU/link-uri-fara-diacritice-in-wordpress.html" />
		<id>http://scribu.net/?p=456</id>
		<updated>2012-01-17T18:42:57Z</updated>
		<published>2009-03-25T17:20:03Z</published>
		<category scheme="http://scribu.net" term="Util" /><category scheme="http://scribu.net" term="diacritice" /><category scheme="http://scribu.net" term="ro" />		<summary type="html"><![CDATA[Update: Acest defect a fost în sfârșit rezolvat și nu ar trebui să mai facă probleme în WordPress 3.1 (care ar trebui să apară prin decembrie, 2010). Mi-ar place ca toate lucrurile să meargă, pur și simplu. Din păcate, asta nu se întâmplă aproape niciodată, mai ales când vine vorba de diacritice și mai ales [...]]]></summary>
		<content type="html" xml:base="http://scribu.net/util/link-uri-fara-diacritice-in-wordpress.html">&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Acest defect a fost în sfârșit &lt;a href="http://core.trac.wordpress.org/changeset/15931"&gt;rezolvat&lt;/a&gt; și nu ar trebui să mai facă probleme în WordPress 3.1 (care ar trebui să apară prin decembrie, 2010).&lt;/p&gt;
&lt;p&gt;Mi-ar place ca toate lucrurile să meargă, pur și simplu. Din păcate, asta nu se întâmplă aproape niciodată, mai ales când vine vorba de diacritice și mai ales dacă ne uităm la &lt;a href="http://kitblog.com/2008/10/romanian_diacritic_marks.html"&gt;diacriticele românești&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Deoarece URL-urile cu diacritice cauzează diferite problem în motoarele de căutare și nu numai, WordPress le convertește automat.&lt;/p&gt;
&lt;p&gt;Din păcate, literele &amp;#8216;ț&amp;#8217; și &amp;#8216;ș&amp;#8217; nu sunt convertite în &amp;#8216;t&amp;#8217;, respectiv &amp;#8216;s&amp;#8217;.&lt;/p&gt;
&lt;p&gt;Există însă o soluție destul de simplă: În fișierul &lt;code&gt;functions.php&lt;/code&gt; al temei de WordPress folosite de tine, adaugă următoarele linii de cod:&lt;/p&gt;

&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="php" style="font-family:monospace;"&gt;add_filter&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'wp_insert_post_data'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'caractere_problema'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; caractere_problema&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;
	&lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt; &lt;span style="color: #990000;"&gt;empty&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'post_name'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;
		&lt;span style="color: #000088;"&gt;$name&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'post_title'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
	&lt;span style="color: #b1b100;"&gt;else&lt;/span&gt;
		&lt;span style="color: #000088;"&gt;$name&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'post_name'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span style="color: #000088;"&gt;$rep&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;array&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;
		&lt;span style="color: #0000ff;"&gt;'%c8%9b'&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'t'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
		&lt;span style="color: #0000ff;"&gt;'%c8%99'&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'s'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
		&lt;span style="color: #990000;"&gt;urldecode&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'%c8%9b'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'t'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
		&lt;span style="color: #990000;"&gt;urldecode&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'%c8%99'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'s'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
	&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span style="color: #000088;"&gt;$new_name&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;str_replace&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;
		&lt;span style="color: #990000;"&gt;array_keys&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$rep&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
		&lt;span style="color: #990000;"&gt;array_values&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$rep&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
		&lt;span style="color: #000088;"&gt;$name&lt;/span&gt;
	&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$new_name&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;
		&lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'post_name'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$new_name&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
	&lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #000088;"&gt;$data&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Asta e tot.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/scribu/util/~4/FTU2owLeQiU" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://scribu.net/util/link-uri-fara-diacritice-in-wordpress.html#comments" thr:count="11" />
		<link rel="replies" type="application/atom+xml" href="http://scribu.net/util/link-uri-fara-diacritice-in-wordpress.html/feed" thr:count="11" />
		<thr:total>11</thr:total>
	<feedburner:origLink>http://scribu.net/util/link-uri-fara-diacritice-in-wordpress.html</feedburner:origLink></entry>
	</feed>

