<?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>Guy Rutenberg</title>
	<atom:link href="http://www.guyrutenberg.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guyrutenberg.com</link>
	<description>Keeping track of what I do</description>
	<lastBuildDate>Fri, 17 May 2013 16:12:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>spass-3.1 Secure Password Generator Released</title>
		<link>http://www.guyrutenberg.com/2013/05/17/spass-3-1-secure-password-generator-released/</link>
		<comments>http://www.guyrutenberg.com/2013/05/17/spass-3-1-secure-password-generator-released/#comments</comments>
		<pubDate>Fri, 17 May 2013 16:12:44 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[spass]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1398</guid>
		<description><![CDATA[Usually release announcements go together with the actual release. Somehow, I&#8217;ve postponed writing about the new release for quite some time, but better late than never. spass is a tool that creates cryptographically strong passwords and passphrases by generating random bits from your sound card. It works by passing noise from the sound card through [...]]]></description>
				<content:encoded><![CDATA[<p>Usually release announcements go together with the actual release. Somehow, I&#8217;ve postponed writing about the new release for quite some time, but better late than never.</p>
<p> <code>spass</code> is a tool that creates cryptographically strong passwords and passphrases by generating random bits from your sound card. It works by passing noise from the sound card through a Von Neumann process to remove bias and then uses MD5 to &#8220;distill&#8221; a truly random bit from every 4 bits of input.</p>
<p>The new version of <code>spass</code>, version 3.1, was released two months ago. The code should now compile easily on both Linux (ALSA, OSS and PortAudio backends) and Windows (only PortAudio is supported). There is some minor tweaks to the CLI, but the main part is a new Qt interface, screenshots of it available on the <a href="http://sourceforge.net/projects/spass/">project&#8217;s SourceForge page</a>. I&#8217;ve also migrated the build system to CMake (from automake) which should make it easier to build.</p>
<p>You can download the sources, 64bit Debian package and binaries for windows <a href="http://sourceforge.net/projects/spass/files/spass-3.1/">from here</a>. If you use <code>spass</code> and create binary packages for more platforms, it will be great.</p>
<p>BTW as you can see I&#8217;ve migrated the code to SourceForge from GitHub. I know it not a popular move, but <a href="/2013/02/08/github-stops-offering-binary-downloads/" title="GitHub Stops Offering Binary Downloads">their lack of binary downloads</a> is really frustrating.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2013/05/17/spass-3-1-secure-password-generator-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing Access to phpMyAdmin on Lighttpd via SSH</title>
		<link>http://www.guyrutenberg.com/2013/04/05/securing-access-to-phpmyadmin-on-lighttpd-via-ssh/</link>
		<comments>http://www.guyrutenberg.com/2013/04/05/securing-access-to-phpmyadmin-on-lighttpd-via-ssh/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 08:53:14 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1376</guid>
		<description><![CDATA[phpMyAdmin lets easily manage your MySQL databases, as such it also presents a security risk. Logging in to phpMyAdmin is done using a username and password for the database. Hence, if someone is able to either eavesdrop or guess by brute-force the username and password could wreak havoc of your server. A possible solution to [...]]]></description>
				<content:encoded><![CDATA[<p>phpMyAdmin lets easily manage your MySQL databases, as such it also presents a security risk. Logging in to phpMyAdmin is done using a username and password for the database. Hence, if someone is able to either eavesdrop or guess by brute-force the username and password could wreak havoc of your server.</p>
<p>A possible solution to the eavesdropping problem, is to use SSL to secure the communication to the phpMyAdmin. However, SSL certificates don&#8217;t present any method to stop brute-forcing. To prevent brute-forcing attempts, you could limit access to your IP address. However, most of us don&#8217;t have static IPs at home. The solution I came up with, kinds of combines both approaches.</p>
<p>Instead of using SSL to encrypt the data sent, I&#8217;m using SSH and instead of limiting access to my IP address, I&#8217;ll limit access to the server&#8217;s IP address. How will it work? First we start by editing the phpMyAdmin configuration for lighttpd. This usually resides in <code>/etc/lighttpd/conf-enabled/50-phpmyadmin.conf</code>. At the top of the file you&#8217;ll find the following lines:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">alias.url += (
        &quot;/phpmyadmin&quot; =&gt; &quot;/usr/share/phpmyadmin&quot;,
)</pre></td></tr></table></div>

<p>These lines define the mapping to the phpmyadmin installation, without it the phpMyAdmin wouldn&#8217;t be accessible. We use lighttpd&#8217;s conditional configuration to limit who is able to use that mapping by changing the above lines to:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$HTTP[&quot;remoteip&quot;] == &quot;85.25.120.32&quot; {
        alias.url += (
                &quot;/phpmyadmin&quot; =&gt; &quot;/usr/share/phpmyadmin&quot;,
        )
}</pre></td></tr></table></div>

<p>This limit access to the phpMyAdmin only to clients whose IP is the server&#8217;s IP (of course you&#8217;ll need to change that IP to your server&#8217;s IP). This stops curtails any brute-forcing attempts, as only someone trying to access the phpMyAdmin from the server itself will succeed.</p>
<p>But how can we &#8220;impersonate&#8221; the server&#8217;s IP when we connect from home? The easiest solution would be to use to the SOCKS proxy provided by SSH.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">ssh user@server.com -D 1080</pre></td></tr></table></div>

<p>This will setup a SOCKS proxy on port 1080 (locally) that will tunnel traffic through your server. The next step is to instruct your browser of OS to use that proxy (in Firefox it can be done via Preferences->Advanced->Network->Connection Settings, it can also be defined globally via Network Settings->Network Proxy under Gnome). This achieves both of our goals. We are now able to connect to the server while using its own IP and our connection to the server is encrypted using SSH.</p>
<p>This method can be used to secure all kinds of sensitive applications. We could have achieved the same thing by using a VPN, but it&#8217;s more hassle to setup compared to SSH which is available on any server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2013/04/05/securing-access-to-phpmyadmin-on-lighttpd-via-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Incremental WordPress Backups using Duply (Duplicity)</title>
		<link>http://www.guyrutenberg.com/2013/03/28/incremental-wordpress-backups-using-duply-duplicity/</link>
		<comments>http://www.guyrutenberg.com/2013/03/28/incremental-wordpress-backups-using-duply-duplicity/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 21:49:04 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[duplicity]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1354</guid>
		<description><![CDATA[This post outlines how to create encrypted incremental backups for WordPress using duplicity and duply. The general method, as you will see is pretty generic, and I&#8217;ve been using it successfully to backup also Django sites and MediaWiki installations. You can use this method to make secure backups to almost any kind of service imagineable: [...]]]></description>
				<content:encoded><![CDATA[<p>This post outlines how to create encrypted incremental backups for WordPress using <a href="http://duplicity.nongnu.org/">duplicity</a> and <a href="http://duply.net/">duply</a>. The general method, as you will see is pretty generic, and I&#8217;ve been using it successfully to backup also Django sites and MediaWiki installations. You can use this method to make secure backups to almost any kind of service imagineable: ftp, sftp, Amazon S3, rsync, Rackspace Open Cloud, Ubuntu One, Google Drive and whatever else you can think about (as long as the duplicity folks implemented <img src='http://www.guyrutenberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ). If you prefer a simpler solution, and don&#8217;t care about incremental or encrypted backups, see my <a href="http://www.guyrutenberg.com/2010/02/28/improved-ftp-backup-for-wordpress/" title="Improved FTP Backup for WordPress">Improved FTP Backup for WordPress</a> or my <a href="http://www.guyrutenberg.com/2008/10/11/wordpress-backup-to-amazon-s3-script/" title="WordPress Backup to Amazon S3 Script">WordPress Backup to Amazon S3 Script</a>.<br />
<span id="more-1354"></span><br />
Duplicity is the magic behind all this. It&#8217;s a handy program that manages the actual backup process. It creates the incremental diffs, encrypts and saves everything to the remote server. The downside of duplicity is its lack of permanent &#8220;configuration&#8221; &#8211; each time you need to specify every detail about the backup job. Duply, a wrapper around duplicity, sovles this by creating a configuration file to each backup job.</p>
<p>I&#8217;ll describe using both to make encrypted incremental backups for both the files and the database (assuming mysql). If you&#8217;re using another database, like PostgreSQL, you could probably do something similar. We start by initializing a duply configuration for our new backup job:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ duply my_blog create</pre></td></tr></table></div>

<p>This will create a duply profile directory <code>~/.duply/my_blog/</code>. Unless otherwise noted, we will refer to files in that directory.</p>
<p>The next step is to edit the variables defined in <code>conf</code> file to suit your needs. The file is fairly documented, so it shouldn&#8217;t be a problem. I&#8217;ll walk you through the major things that need your attention and modifications.</p>
<p>The first thing which you will want to set is <code>SOURCE</code> to where your blog resided (e.g. <code>/home/user/my_blog</code>. We&#8217;ll also drop the sqldump of the database there, but more on that later.</p>
<p><code>TARGET</code> determines where the backups will go to. Almost anything that comes to mind is supported: FTP, SFTP, SSH, Amazon S3 (my favorite), Ubuntu One, Cloud Files, loc files and even mail (and I haven&#8217;t listed everything). You should see <a href="http://duplicity.nongnu.org/duplicity.1.html#sect8" title="URL Format">Duplicity&#8217;s documentation on URL format</a> for details on exactly how to specify it, as it is backend dependent. Some examples are:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">file:///home/user/backups
ftp://example.com/backups
s3://s3.amazonaws.com/my_bucket/backup_dir</pre></td></tr></table></div>

<p>You should use <code>TARGET_USER</code> and <code>TARGET_PASS</code> to specify the username and password for authenticating the backend if necessary (if you are using S3 it will be your <code>AWS_ACCESS_KEY_ID</code> and <code>AWS_SECRET_ACCESS_KEY</code> respectively).</p>
<p><code>MAX_FULLBKP_AGE</code> specifies how often should a full backup be preformed instead of incremental ones. <a href="http://duplicity.nongnu.org/duplicity.1.html#sect9">Time format</a> can be specified using values like <code>1Y</code>, <code>3M</code> etc.</p>
<p>You&#8217;ll want to set <code>MAX_AGE</code> and <code>MAX_FULL_BACKUPS</code> as this help you remove old incremental and full backups as they expire.</p>
<p>Last but not least, the <code>GPG_PW</code> and <code>GPG_KEY</code> are used to specify encryption passphrase and keys. If you don&#8217;t specify a <code>GPG_KEY</code>, the passphrase will be used for symmetric encryption. If you do specify, asymmetric encryption will be used. The config file duply created will have further information on more advanced configurations (like encrypting and signing with different keys, or encrypting but no signing so no private key is needed).</p>
<p>The next thing to edit is the <code>exclude</code> file and add patterns for files to ignore. If you use wp-cache or WP Super Cache you should do the following:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ echo &quot;**cache&quot; &gt;&gt; ~/.duply/my_blog/conf</pre></td></tr></table></div>

<p>Until now we handled the backup of files, and nothing was WordPress specific. Save the next snippet under <code>~/.duply/my_blog/pre</code> (taken from my <a href="/2010/02/28/improved-ftp-backup-for-wordpress/" title="Improved FTP Backup for WordPress">Improved FTP Backup for WordPress</a> script):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/bash</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">umask</span> 077
&nbsp;
<span style="color: #666666; font-style: italic;"># Uncomment for duply &gt;=: 1.5.4.2</span>
<span style="color: #666666; font-style: italic;"># if [ &quot;${CMD_NEXT}&quot;  != &quot;bkp&quot; ]; then</span>
<span style="color: #666666; font-style: italic;"># 	echo &quot;Skipping, not running a backup&quot;</span>
<span style="color: #666666; font-style: italic;"># 	exit 0</span>
<span style="color: #666666; font-style: italic;"># fi</span>
&nbsp;
&nbsp;
<span style="color: #007800;">DB_NAME</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&lt;?php require_once(<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">${SOURCE}</span>/wp-config.php<span style="color: #000099; font-weight: bold;">\&quot;</span>); echo DB_NAME;&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> php<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">DB_USER</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&lt;?php require_once(<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">${SOURCE}</span>/wp-config.php<span style="color: #000099; font-weight: bold;">\&quot;</span>); echo DB_USER;&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> php<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">DB_PASS</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&lt;?php require_once(<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">${SOURCE}</span>/wp-config.php<span style="color: #000099; font-weight: bold;">\&quot;</span>); echo DB_PASSWORD;&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> php<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">DB_HOST</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&lt;?php require_once(<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">${SOURCE}</span>/wp-config.php<span style="color: #000099; font-weight: bold;">\&quot;</span>); echo DB_HOST;&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> php<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
mysqldump <span style="color: #660033;">--user</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${DB_USER}</span>&quot;</span> <span style="color: #660033;">--password</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${DB_PASS}</span>&quot;</span> <span style="color: #660033;">--host</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${DB_HOST}</span>&quot;</span> \
 <span style="color: #660033;">--databases</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${DB_NAME}</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${SOURCE}</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span>dump.sql</pre></td></tr></table></div>

<p>The is will cause the script above to run before each backup. The script reads <code>wp-config.php</code> and dumps the blog&#8217;s db into a file called <code>dump.sql</code> in root directory of the blog. Now in order prevent accessing the dump file, black list it in the web server. If you use Apache, add the following to your htaccess</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">&lt;files dump.sql&gt;
Deny
&lt;/files&gt;</pre></td></tr></table></div>

<p>If you use lighttpd, you can use <code>mod_access</code> to do the same:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">url.access-deny            = ( &quot;~&quot;, &quot;.inc&quot;, &quot;.sql&quot; )</pre></td></tr></table></div>

<p>(this will block everything that ends with &#8220;<code>.sql</code>&#8220;, change this if it doesn&#8217;t suit you).</p>
<p>Finally to the backup itself.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ duply my_blog backup
$ duply my_blog restore</pre></td></tr></table></div>

<p>The first will backup everything as you configured, making incremental and full backups as needed. The second restores the files to their original location. After restoring, you&#8217;ll need to manually import the <code>dump.sql</code> file. See duplicity and duply documentation on how to restore to other location, restore only specific files, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2013/03/28/incremental-wordpress-backups-using-duply-duplicity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manually Install SSL Certificate in Android Jelly Bean</title>
		<link>http://www.guyrutenberg.com/2013/03/16/manually-install-ssl-certificate-in-android-jelly-bean/</link>
		<comments>http://www.guyrutenberg.com/2013/03/16/manually-install-ssl-certificate-in-android-jelly-bean/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 11:58:20 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1364</guid>
		<description><![CDATA[Apparently it&#8217;s pretty easy, but there are some pitfalls. The first step is to export the certificate as a DER encoded X.509 certificate. This can be done using Firefox (on a PC) by clicking on the SSL&#8217;s lock sign in the address bar, More Information -> View Certificate -> Details -> Export. The exported certificate [...]]]></description>
				<content:encoded><![CDATA[<p>Apparently it&#8217;s pretty easy, but there are some pitfalls. The first step is to export the certificate as a DER encoded X.509 certificate. This can be done using Firefox (on a PC) by clicking on the SSL&#8217;s lock sign in the address bar, More Information -> View Certificate -> Details -> Export. The exported certificate needs to be saved on the root directory of the internal storage of the phone, with <code>*.cer</code> extension (or <code>*.crt</code>). Other extensions will not work.</p>
<p>Afterwards, on the phone, click on &#8220;Install from device storage&#8221; under Settings->Security->Credential Storage. If you did everything as you should at the previous step, it will display the certificate name, and ask you to confirm its installation. If you&#8217;ve exported the certificate as the wrong format, gave it the wrong extension or placed it somewhere else than the root of the internal storage, it will display the following error:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">No certificate file found in USB storage</pre></td></tr></table></div>

<p>If you see it, just make sure you are exporting the certificate correctly and saving it at the right place.</p>
<p>More details: <a href="http://support.google.com/android/bin/answer.py?hl=en&#038;answer=1649774" title="Work with certificates">Work with certificates</a> (Geared towards Galaxy Nexus, but should apply to any Android 4.0 and above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2013/03/16/manually-install-ssl-certificate-in-android-jelly-bean/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GitHub Stops Offering Binary Downloads</title>
		<link>http://www.guyrutenberg.com/2013/02/08/github-stops-offering-binary-downloads/</link>
		<comments>http://www.guyrutenberg.com/2013/02/08/github-stops-offering-binary-downloads/#comments</comments>
		<pubDate>Fri, 08 Feb 2013 07:37:58 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[SourceForge]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1348</guid>
		<description><![CDATA[Only few month ago, almost anyone would swear by GitHub and curse SourceForge. GitHub was (and probably still) the fastest growing and by now the largest code repository, while SourceForge was the overthrown king. SourceForge looks like an archaic service despite some major facelifts while GitHub is the cool kid on the block. Recently, GitHub [...]]]></description>
				<content:encoded><![CDATA[<p>Only few month ago, almost anyone would swear by GitHub and curse SourceForge. GitHub was (and probably still) the fastest growing and by now the largest code repository, while SourceForge was the overthrown king.  SourceForge looks like an archaic service despite some <a href="http://www.guyrutenberg.com/2012/11/03/the-new-sourceforge/" title="The New SourceForge">major facelifts</a> while  GitHub is the cool kid on the block. Recently, GitHub showed us why SourceForge is still relevant for the open-source community.</p>
<p>Back in December, GitHub <a href="https://github.com/blog/1302-goodbye-uploads" title="Goodbye, Uploads">dropped their support for downloading files</a> from outside the code repository. They say that they believe that code should be distributed directly from the git repository. This is probably fine for projects written in dynamic languages (such as python, ruby, javascript) where no binary distribution is expected. However, this seems to me like a blow to any GitHub hosted C/C++ project. No one expects lay users to compile projects directly from source, it a hassle for most people except developers (and possibly Gentoo users <img src='http://www.guyrutenberg.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).</p>
<p>It might be a good idea on GitHub team, as they promote themselves as a developer collaboration tool, and also most of their projects a indeed in dynamic languages (see the <a href="https://github.com/languages" title="Top Languages">top languages statistics</a>). The GitHub teams offers in their post two solutions: Uploading files to Amazon S3 and switching to SourceForge, and I&#8217;ve read at least a few people recommending putting binary releases in the git repository (bad idea).</p>
<p>Overall, I think this move by GitHub, just turned SourceForge into the best code repository (for compiled code) once again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2013/02/08/github-stops-offering-binary-downloads/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Vim: Creating .clang_complete using CMake</title>
		<link>http://www.guyrutenberg.com/2013/01/29/vim-creating-clang_complete-using-cmake/</link>
		<comments>http://www.guyrutenberg.com/2013/01/29/vim-creating-clang_complete-using-cmake/#comments</comments>
		<pubDate>Tue, 29 Jan 2013 20:48:17 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[vim]]></category>
		<category><![CDATA[clang]]></category>
		<category><![CDATA[CMake]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1339</guid>
		<description><![CDATA[The clang_complete plugin for Vim, offers superior code completion. If your project is anything but trivial, it will only do so if you provide .clang_compelete file with the right compilation argument. The easy way to do so is by using the cc_args.py script that comes with it to record the options directly into the .clang_compelete [...]]]></description>
				<content:encoded><![CDATA[<p>The <a href="/2012/03/12/bye-bye-omnicppcomplete-hello-clang-complete/" title="Bye Bye OmniCppComplete, Hello Clang Complete">clang_complete plugin for Vim</a>, offers superior code completion. If your project is anything but trivial, it will only do so if you provide <code>.clang_compelete</code> file with the right compilation argument. The easy way to do so is by using the <code>cc_args.py</code> script that comes with it to record the options directly into the <code>.clang_compelete</code> file. Usually one does</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">make CXX='~/.vim/bin/cc_args.py clang++'</pre></td></tr></table></div>

<p>However, the makefile generated by CMake doesn&#8217;t support the CXX configuration.</p>
<p>The solution is to call CMake with the CXX environment variable set:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">CXX='~/.vim/bin/cc_args.py clang++' cmake ..
make</pre></td></tr></table></div>

<p>Note that this will create the <code>clang_complete</code> file in the build directory (I&#8217;ve assumed out-of-place build), so just copy over the file to the working dir of your vim so it can find it. You&#8217;ll need to re-run cmake again (without the <code>CXX</code>, to disable re-creating the <code>.clang_complete</code> file each time.</p>
<p>While looking for this solution, I&#8217;ve first tried solving it by setting the CMAKE_CXX_COMPILER variable in CMake, however for some strange reason it didn&#8217;t like it, saying that the compiler wasn&#8217;t found (it shuns command line arguments given in the compiler command).</p>
<p>The more I use clang_compelete the more awesome I find it. It has it quirks but nonetheless it&#8217;s much simpler and better than manually <a href="http://www.guyrutenberg.com/2008/02/23/setting-up-omnicomplete-autocompletion-for-wxwidgets-in-vim/" title="Setting Up OmniComplete (Autocompletion) for wxWidgets in Vim">creating tag files for each library</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2013/01/29/vim-creating-clang_complete-using-cmake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using std::chrono::high_resolution_clock Example</title>
		<link>http://www.guyrutenberg.com/2013/01/27/using-stdchronohigh_resolution_clock-example/</link>
		<comments>http://www.guyrutenberg.com/2013/01/27/using-stdchronohigh_resolution_clock-example/#comments</comments>
		<pubDate>Sat, 26 Jan 2013 22:36:42 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1330</guid>
		<description><![CDATA[5 years a go I&#8217;ve showed how to use clock_gettime to do basic high_resolution profiling. The approach there is very useful, but unfortunately, not cross-platform. It works only on POSIX compliant systems (especially not windows). Luckily, the not-so-new C++11 provides, among other things, interface to high-precision clocks in a portable way. It&#8217;s still not a [...]]]></description>
				<content:encoded><![CDATA[<p>5 years a go I&#8217;ve showed how to <a href="/2007/09/22/profiling-code-using-clock_gettime/" title="Profiling Code Using clock_gettime">use <code>clock_gettime</code></a> to do basic high_resolution profiling. The approach there is very useful, but unfortunately, not cross-platform. It works only on POSIX compliant systems (especially not windows).</p>
<p>Luckily, the not-so-new C++11 provides, among other things, interface to high-precision clocks in a portable way. It&#8217;s still not a perfect solution, as it only provides wall-time (<code>clock_gettime</code> can give per process and per thread actual CPU time as well). However, it&#8217;s still nice.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #339900;">#include &lt;iostream&gt;</span>
<span style="color: #339900;">#include &lt;chrono&gt;</span>
<span style="color: #0000ff;">using</span> <span style="color: #0000ff;">namespace</span> std<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> chrono<span style="color: #008080;">::</span><span style="color: #007788;">high_resolution_clock</span><span style="color: #008080;">::</span><span style="color: #007788;">period</span><span style="color: #008080;">::</span><span style="color: #007788;">den</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">auto</span> start_time <span style="color: #000080;">=</span> chrono<span style="color: #008080;">::</span><span style="color: #007788;">high_resolution_clock</span><span style="color: #008080;">::</span><span style="color: #007788;">now</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">int</span> temp<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i<span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">242000000</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
		temp<span style="color: #000040;">+</span><span style="color: #000080;">=</span>temp<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">auto</span> end_time <span style="color: #000080;">=</span> chrono<span style="color: #008080;">::</span><span style="color: #007788;">high_resolution_clock</span><span style="color: #008080;">::</span><span style="color: #007788;">now</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> chrono<span style="color: #008080;">::</span><span style="color: #007788;">duration_cast</span><span style="color: #000080;">&lt;</span>chrono<span style="color: #008080;">::</span><span style="color: #007788;">seconds</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>end_time <span style="color: #000040;">-</span> start_time<span style="color: #008000;">&#41;</span>.<span style="color: #007788;">count</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;:&quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> chrono<span style="color: #008080;">::</span><span style="color: #007788;">duration_cast</span><span style="color: #000080;">&lt;</span>chrono<span style="color: #008080;">::</span><span style="color: #007788;">microseconds</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>end_time <span style="color: #000040;">-</span> start_time<span style="color: #008000;">&#41;</span>.<span style="color: #007788;">count</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;:&quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>I&#8217;ll explain a bit the code. <code>chrono</code> is the new header files that provides various time and clock related functionality of the new standard library. <code>high_resolution_clock</code> should be, according to the standard, the clock with the highest precision.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> chrono<span style="color: #008080;">::</span><span style="color: #007788;">high_resolution_clock</span><span style="color: #008080;">::</span><span style="color: #007788;">period</span><span style="color: #008080;">::</span><span style="color: #007788;">den</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>Note, that there isn&#8217;t a guarantee how many the ticks per seconds it has, only that it&#8217;s the highest available. Hence, the first thing we do is to get the precision, by printing how many many times a second the clock ticks. My system provides 1000000 ticks per second, which is a microsecond precision.</p>
<p>Getting the current time using <code>now()</code> is self-explanatory. The possibly tricky part is</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> chrono<span style="color: #008080;">::</span><span style="color: #007788;">duration_cast</span><span style="color: #000080;">&lt;</span>chrono<span style="color: #008080;">::</span><span style="color: #007788;">seconds</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>end_time <span style="color: #000040;">-</span> start_time<span style="color: #008000;">&#41;</span>.<span style="color: #007788;">count</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;:&quot;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p><code>(end_time - start_time)</code> is a <code>duration</code> (newly defined type) and the <code>count()</code> method returns the number of ticks it represents. As we said, the number of ticks per second may change from system to system, so in order to get the number of seconds we use <code>duration_cast</code>. The same goes in the next line for microseconds.</p>
<p>The standard also provides other useful time units such as nanoseconds, milliseconds, minutes and even hours.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2013/01/27/using-stdchronohigh_resolution_clock-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Citrix Receiver on Ubuntu 64bit</title>
		<link>http://www.guyrutenberg.com/2012/12/22/installing-citrix-receiver-on-ubuntu-64bit/</link>
		<comments>http://www.guyrutenberg.com/2012/12/22/installing-citrix-receiver-on-ubuntu-64bit/#comments</comments>
		<pubDate>Sat, 22 Dec 2012 10:58:29 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1254</guid>
		<description><![CDATA[It&#8217;s a hassle. The first step is to grab the 64bit deb package from Citrix website. Next install it using dpkg: ~$ sudo dpkg --install Downloads/icaclient_12.1.0_amd64.deb This results in the following error: dpkg: error processing icaclient (--install): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: icaclient Which can be [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s a hassle.</p>
<p>The first step is to grab the 64bit <code>deb</code> package from <a href="http://www.citrix.com/downloads/citrix-receiver/receivers-by-platform/receiver-for-linux-121.html">Citrix website</a>. Next install it using <code>dpkg</code>:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">~$ sudo dpkg --install Downloads/icaclient_12.1.0_amd64.deb</pre></td></tr></table></div>

<p>This results in the following error:</p>
<blockquote>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">dpkg: error processing icaclient (--install):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 icaclient</pre></td></tr></table></div>

</blockquote>
<p>Which can be fixed by changing line 2648 in <code>/var/lib/dpkg/info/icaclient.postinst</code>:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">         echo $Arch|grep &quot;i[0-9]86&quot; &amp;gt;/dev/null</pre></td></tr></table></div>

<p>to:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">         echo $Arch|grep -E &quot;i[0-9]86|x86_64&quot; &amp;gt;/dev/null</pre></td></tr></table></div>

<p>And then execute</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">~$ sudo dpkg --configure icaclient</pre></td></tr></table></div>

<p>Credit for this part goes to <a href="http://forums.citrix.com/message.jspa?messageID=1640253#1640253">Alan Burton-Woods</a>.</p>
<p>Next, when trying to actually use the Citrix Receiver to launch any apps, I&#8217;ve encountered the following error:</p>
<blockquote>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">Contact your help desk with the following information:
You have not chosen to trust &quot;AddTrust External CA Root&quot;, the
issuer of the server's security certificate (SSL error 61)</pre></td></tr></table></div>

</blockquote>
<p style="text-align: center;"><a href="http://www.guyrutenberg.com/wp-content/uploads/2012/11/citrix_error.png"><img class="aligncenter size-full wp-image-1270" title="citrix_error" src="http://www.guyrutenberg.com/wp-content/uploads/2012/11/citrix_error.png" alt="" width="442" height="188" /></a></p>
<p>In my case the missing root certificate was Comodo&#8217;s AddTrust External CA Root, depending on the certificate used by the server you&#8217;re trying to connect to, you may miss some other root certificate. Now you can either download the certificate from <a href="https://support.comodo.com/index.php?_m=downloads&#038;_a=viewdownload&#038;downloaditemid=87">Comodo</a>, or use the one in <code> /usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt</code> (they are the same). Either way, you should copy the certificate to the <code>icaclient</code> certificate directory:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ sudo mv /usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt /opt/Citrix/ICAClient/keystore/cacerts/</pre></td></tr></table></div>

<p>These steps got Citrix working for me, but your mileage may vary.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2012/12/22/installing-citrix-receiver-on-ubuntu-64bit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>nameref Doesn&#8217;t Work Properly with Theorem Environment</title>
		<link>http://www.guyrutenberg.com/2012/12/15/nameref-doesnt-work-properly-with-theorem-environment/</link>
		<comments>http://www.guyrutenberg.com/2012/12/15/nameref-doesnt-work-properly-with-theorem-environment/#comments</comments>
		<pubDate>Sat, 15 Dec 2012 21:34:39 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1285</guid>
		<description><![CDATA[I came across not-so-expected behavior in nameref, the package responsible for creating named references, when used in conjunction with theorem environments such as the one provided by amsthm. For example take a look at the following LaTeX document. \documentclass{article} \usepackage{amsmath,hyperref} &#160; \begin{document} \section{My Section} \newtheorem{theorem}{Theorem} \begin{theorem}[My Theorem] \label{theo:My}0=0 \end{theorem} This is a named reference: \nameref{theo:My} [...]]]></description>
				<content:encoded><![CDATA[<p>I came across not-so-expected behavior in <code>nameref</code>, the package responsible for creating named references, when used in conjunction with theorem environments such as the one provided by <code>amsthm</code>. For example take a look at the following LaTeX document.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">article<span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span>amsmath,hyperref<span style="color: #E02020; ">}</span>
&nbsp;
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #0000D0; font-weight: normal;">document</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">section</span><span style="color: #E02020; ">{</span>My Section<span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\newtheorem</span><span style="color: #E02020; ">{</span>theorem<span style="color: #E02020; ">}{</span>Theorem<span style="color: #E02020; ">}</span>
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #0000D0; font-weight: normal;">theorem</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">My Theorem</span><span style="color: #E02020; ">]</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">label</span><span style="color: #E02020; ">{</span>theo:My<span style="color: #E02020; ">}</span>0=0
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #0000D0; font-weight: normal;">theorem</span><span style="color: #E02020; ">}</span>
This is a named reference: <span style="color: #800000; font-weight: normal;">\nameref</span><span style="color: #E02020; ">{</span>theo:My<span style="color: #E02020; ">}</span>
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span></pre></td></tr></table></div>

<p>You would expect the named reference to refer to the <strong>theorem&#8217;s</strong> name. However in reality it refers to the <strong>section&#8217;s</strong> name.</p>
<p><a href="http://www.guyrutenberg.com/wp-content/uploads/2012/12/Screenshot-from-2012-12-15-154837.png"><img src="http://www.guyrutenberg.com/wp-content/uploads/2012/12/Screenshot-from-2012-12-15-154837.png" alt="" title="Screenshot from 2012-12-15 15:48:37" width="239" height="91" class="aligncenter size-full wp-image-1286" /></a><br />
<span id="more-1285"></span></p>
<p>While searching for a solution I came across the following answer by <a href="http://stackoverflow.com/a/6821032">Catalin in StackOverflow</a>, which suggest it&#8217;s an old bug in <code>nameref</code> that (according to the mailing list conversation he linked to) should have been resolved in<code> nameref-2.37</code>. This is a conversation from 2010, but my Ubuntu 12.04 still has <code>nameref-2.31</code> from 2007.</p>
<p>It seems like Ubuntu is a bit behind at updating TeXLive. I&#8217;m considering at installing off-the-repo TeXLive so I would have up-to-date TeX installation. I think I had in my two years ago more up-to-date version of TeXLive. Migrating to the official distribution would probably fix the <a href="/2012/04/20/installing-culmus-latex-on-ubuntu-11-10/" title="Installing culmus-latex on Ubuntu 11.10">Debian bug causing the installation of culmus-latex to fail</a> as well.</p>
<p>But in the meantime I&#8217;ve looked for a workaround. After reading the <a href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/hyperref/nameref.pdf"><code>nameref</code> documentation</a>, I concluded that the problem is that nameref doesn&#8217;t properly hook the theorem-like environments to set the <code>\@currentlabelname</code>. A possible workaround requires defining the theorem environment using <code>thmtools</code>. The <code>thmtools</code> gives us the <code>\thmt@optarg</code> command which expands to the name passed to the theorem environment, so we&#8217;re able to set <code>\@currentlabelname</code> properly. Basically, you need to add the following line after the <code>\begin{theorem}[some name]</code> and before the <code>\label</code> part:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">makeatletter</span> <span style="color: #E02020; ">\</span><span style="color: #800000;">let</span><span style="color: #E00000; font-weight: normal;">\@currentlabelname</span><span style="color: #800000; font-weight: normal;">\thmt</span>@optarg<span style="color: #E02020; ">\</span><span style="color: #800000;">makeatother</span></pre></td></tr></table></div>

<p>A full example this looks like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">article<span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span>amsmath,thmtools,hyperref<span style="color: #E02020; ">}</span>
<span style="color: #800000; font-weight: normal;">\declaretheorem</span><span style="color: #E02020; ">{</span>theorem<span style="color: #E02020; ">}</span>
&nbsp;
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #0000D0; font-weight: normal;">document</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">section</span><span style="color: #E02020; ">{</span>My Section<span style="color: #E02020; ">}</span>
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #0000D0; font-weight: normal;">theorem</span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">My Theorem</span><span style="color: #E02020; ">]</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">makeatletter</span> <span style="color: #E02020; ">\</span><span style="color: #800000;">let</span><span style="color: #E00000; font-weight: normal;">\@currentlabelname</span><span style="color: #800000; font-weight: normal;">\thmt</span>@optarg<span style="color: #E02020; ">\</span><span style="color: #800000;">makeatother</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">label</span><span style="color: #E02020; ">{</span>theo:My<span style="color: #E02020; ">}</span>0=0
&nbsp;
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #0000D0; font-weight: normal;">theorem</span><span style="color: #E02020; ">}</span>
&nbsp;
This is a named reference: <span style="color: #800000; font-weight: normal;">\nameref</span><span style="color: #E02020; ">{</span>theo:My<span style="color: #E02020; ">}</span>
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span></pre></td></tr></table></div>

<p><a href="http://www.guyrutenberg.com/wp-content/uploads/2012/12/Screenshot-from-2012-12-15-232257.png"><img src="http://www.guyrutenberg.com/wp-content/uploads/2012/12/Screenshot-from-2012-12-15-232257.png" alt="" title="Screenshot from 2012-12-15 23:22:57" width="255" height="88" class="aligncenter size-full wp-image-1294" /></a></p>
<p>I think a better solution would be to automatically hook after the <code>\begin{theorem}</code> to add the fix. This is maybe possible using <code>\addtotheorempostheadhook</code>, but I haven&#8217;t figured it out yet.</p>
<p><strong>Update</strong> 2012-12-16: I&#8217;ve installed the offical TeXLive 2012, and it was easier than I thought. It also, as expected, fixed the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2012/12/15/nameref-doesnt-work-properly-with-theorem-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The New SourceForge</title>
		<link>http://www.guyrutenberg.com/2012/11/03/the-new-sourceforge/</link>
		<comments>http://www.guyrutenberg.com/2012/11/03/the-new-sourceforge/#comments</comments>
		<pubDate>Sat, 03 Nov 2012 09:34:41 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SourceForge]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=1251</guid>
		<description><![CDATA[I&#8217;ve recently started upgrading my projects to SourceForge&#8217;s new &#8220;forge&#8221; software Allura. Upgrading existing projects have been available for quite some time (IIRC since July), but I thought I didn&#8217;t have time to deal with it until now. From my short experience with the &#8220;new&#8221; SourceForge resulted in two short insights. The first, upgrading is [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve recently started upgrading my projects to SourceForge&#8217;s new &#8220;forge&#8221; software <a href="http://sourceforge.net/p/allura">Allura</a>. Upgrading existing projects have been available for quite some time (IIRC since July), but I thought I didn&#8217;t have time to deal with it until now. From my short experience with the &#8220;new&#8221; SourceForge resulted in two short insights.<br />
<span id="more-1251"></span><br />
The first, upgrading is a breeze. The SourceForge people did a wonderful job, and upgrading is fast and easy. No tinkering required except updating repository URLs. This surprised me, as I still remember the days when registering a new project on SourceForge was a lengthy process, so I thought upgrading would the same as well. I happily found out I was wrong. I also heard that project registration is quick nowadays. Your project is up immediately and they only approve it afterwards.</p>
<p>The new project management software gives SourceForge its much-needed update. A new code browsing design and ticketing systems are among the things that were updated. They even have some nice little features like syndicating a feed as the your project news on the project&#8217;s page.</p>
<p>Overall everything looks pretty nice, and it seems that finally SourceForge tries to stay competitive in the edge of GitHub. Despite the notorious user interface SourceForge had, I always kind of like it as it was there before others and it was one of places that got me started using and later developing open source programs. I really hope they keep up the good work and continue to improve it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2012/11/03/the-new-sourceforge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
