<?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>sudo -s</title>
	<atom:link href="http://sudoers.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://sudoers.org</link>
	<description>Got root?</description>
	<lastBuildDate>Mon, 08 Aug 2011 20:35:36 +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>Resolving git conflicts</title>
		<link>http://sudoers.org/2011/08/resolving-git-conflicts/</link>
		<comments>http://sudoers.org/2011/08/resolving-git-conflicts/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 20:35:36 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=92</guid>
		<description><![CDATA[If you do a rebase or a pull and it has a merge conflict do the following 1. Check for file that is having conflict 2. Edit code that has conflict and git add 3. Commit edit]]></description>
			<content:encoded><![CDATA[<p>If you do a rebase or a pull and it has a merge conflict do the following</p>
<p>1. Check for file that is having conflict</p>
<pre class="brush: plain; title: ; notranslate"> git status</pre>
<p>2. Edit code that has conflict and git add</p>
<pre class="brush: plain; title: ; notranslate"> git add -a </pre>
<p>3. Commit edit</p>
<pre class="brush: plain; title: ; notranslate">git commit -am &quot;Some message&quot; </pre>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2011/08/resolving-git-conflicts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git configs</title>
		<link>http://sudoers.org/2011/08/git-configs/</link>
		<comments>http://sudoers.org/2011/08/git-configs/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 16:45:19 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Version Control]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=84</guid>
		<description><![CDATA[Because  I never seem to remember them Global git ignore My info Colorized outputs]]></description>
			<content:encoded><![CDATA[<p>Because  I never seem to remember them</p>
<p>Global git ignore</p>
<pre class="brush: plain; title: ; notranslate">
echo &quot;.DS_Store&quot; &gt;&gt; ~/.gitignore
git config --global core.excludesfile ~/.gitignore
</pre>
<p>My info</p>
<pre class="brush: plain; title: ; notranslate">
git config --global user.name &quot;Your Name Comes Here&quot;
git config --global user.email you@yourdomain.example.com
</pre>
<p>Colorized outputs</p>
<pre class="brush: plain; title: ; notranslate">
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2011/08/git-configs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Puppet apt module</title>
		<link>http://sudoers.org/2011/07/72/</link>
		<comments>http://sudoers.org/2011/07/72/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 19:30:30 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[sys admin]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=72</guid>
		<description><![CDATA[Testing out the code plugin]]></description>
			<content:encoded><![CDATA[<p>Testing out the code plugin</p>
<pre class="brush: plain; title: ; notranslate">
class apt {

    file { '/etc/cron.daily/package.list':
        owner   =&gt; root,
        group   =&gt; root,
        mode    =&gt; 755,
        source  =&gt; &quot;puppet:///files/etc/cron.daily/package.list&quot;
    }

    file { &quot;/etc/apt/sources.list&quot;:
        owner   =&gt; root,
        group   =&gt; root,
        mode    =&gt; 644,
        source  =&gt; $lsbdistcodename ? {
            &quot;squeeze&quot;   =&gt; &quot;puppet:///files/etc/apt/sources.list.squeeze&quot;,
            default     =&gt; &quot;puppet:///files/etc/apt/sources.list.squeeze&quot;
        }
    }

    file { '/etc/apt/apt.conf.d/10puppet' :
        ensure  =&gt; present,
        owner   =&gt; root,
        group   =&gt; root,
        mode    =&gt; 644,
        source  =&gt; &quot;puppet:///files/etc/apt/apt.conf.d/10puppet&quot;
    }

    file { '/usr/local/sbin/check-updates':
        owner   =&gt; root,
        group   =&gt; root,
        mode    =&gt; 755,
        source  =&gt; &quot;puppet:///files/usr/local/bin/check-updates&quot;
    }

    exec { 'apt-update':
        command     =&gt; &quot;/usr/bin/apt-get -qq update&quot;,
        logoutput   =&gt; false,
        refreshonly =&gt; true,
        subscribe   =&gt; [File[&quot;/etc/apt/sources.list&quot;]]
    }

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2011/07/72/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sudo while in vim</title>
		<link>http://sudoers.org/2011/07/sudo-while-in-vim/</link>
		<comments>http://sudoers.org/2011/07/sudo-while-in-vim/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 11:05:37 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=40</guid>
		<description><![CDATA[Ever had a time when you opened a file in vim and edited a bunch of stuff without realizing that its read-only, well this solves you from exiting out of the file and reopening the file with sudo]]></description>
			<content:encoded><![CDATA[<p>Ever had a time when you opened a file in vim and edited a bunch of stuff without realizing that its read-only, well this solves you from exiting out of the file and reopening the file with sudo</p>
<pre class="brush: plain; pad-line-numbers: true; title: ; notranslate">:w !sudo tee %</pre>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2011/07/sudo-while-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail log fu</title>
		<link>http://sudoers.org/2009/07/mail-log-fu/</link>
		<comments>http://sudoers.org/2009/07/mail-log-fu/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 22:49:25 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[sys admin]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=27</guid>
		<description><![CDATA[Ever had someone go "I need you to look through the logs and get me every email address this From address sent to". Well heres how (or at least the easiest way I can think of doing it) grep "from=&#60;foo@example.com&#62;" /var/log/mail.log &#124; awk '{if ($6 != "NOQUEUE:"){print $6}}' &#124; sed 's/\://g' &#124; while read SEARCH; [...]]]></description>
			<content:encoded><![CDATA[<p>Ever had someone go "I need you to look through the logs and get me every email address this From address sent to". Well heres how (or at least the easiest way I can think of doing it)</p>
<pre>
<blockquote><code>grep "from=&lt;foo@example.com&gt;" /var/log/mail.log | awk '{if ($6 != "NOQUEUE:"){print $6}}' | sed 's/\://g' | while read SEARCH; do grep "${SEARCH}" /var/log/mail.log; done | grep "to=" | awk '{print $7}' | sed -r 's/^to=&lt;(.+)&gt;\,$/\1/g' | uniq</code></blockquote>
</pre>
<p>Here is a step by step walkthrough of whats going on</p>
<ol>
<li>We grep the from address out of the mail log</li>
<li>Pipe the output to awk and get the 6th column which is the mail id, if the 6th column doesn't start with NOQUEUE print the output</li>
<li>The output goes to sed which removes the ":" and</li>
<li>Read the output and put it into a variable and from that variable go through the mail log again</li>
<li>This time filter out the "to=" line from the mail log and print out the 7th column (which is the to address)</li>
<li>Use sed to filter out the to=&lt;&gt; line to print out the actual email addresses</li>
<li>Pass it through uniq to make sure there are no dupes</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2009/07/mail-log-fu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to remove duplicate file</title>
		<link>http://sudoers.org/2009/04/how-to-remove-duplicate-file/</link>
		<comments>http://sudoers.org/2009/04/how-to-remove-duplicate-file/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 19:16:13 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=25</guid>
		<description><![CDATA[Taken from shell-fu OUTF=rem-duplicates.sh; echo "#! /bin/sh" &#62; $OUTF; find "$@" -type f -print0 &#124; xargs -0 -n1 md5sum &#124; sort --key=1,32 &#124; uniq -w 32 -d --all-repeated=separate &#124; sed -r 's/^[0-9a-f]*( )*//;s/([^a-zA-Z0-9./_-])/\\\1/g;s/(.+)/#rm \1/' &#62;&#62; $OUTF; chmod a+x $OUTF; ls -l $OUTF]]></description>
			<content:encoded><![CDATA[<p>Taken from shell-fu</p>
<blockquote><p><code>OUTF=rem-duplicates.sh;<br />
echo "#! /bin/sh" &gt; $OUTF;<br />
find "$@" -type f -print0 |<br />
xargs -0 -n1 md5sum |<br />
sort --key=1,32 | uniq -w 32 -d --all-repeated=separate |<br />
sed -r 's/^[0-9a-f]*( )*//;s/([^a-zA-Z0-9./_-])/\\\1/g;s/(.+)/#rm \1/' &gt;&gt; $OUTF;<br />
chmod a+x $OUTF; ls -l $OUTF</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2009/04/how-to-remove-duplicate-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deleting special character files in UNIX</title>
		<link>http://sudoers.org/2009/04/deleting-special-character-files-in-unix/</link>
		<comments>http://sudoers.org/2009/04/deleting-special-character-files-in-unix/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 20:25:36 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=21</guid>
		<description><![CDATA[If you're an idiot like me and managed to create a file with special characters like --exclude=*.svn and need to remove it, here's how Remember don't be an idiot like me]]></description>
			<content:encoded><![CDATA[<p>If you're an idiot like me and managed to create a file with special characters like <code>--exclude=*.svn</code> and need to remove it, here's how</p>
<pre class="brush: plain; title: ; notranslate">rm ./'--exclude\=\*.svn'</pre>
<p>Remember don't be an idiot like me</p>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2009/04/deleting-special-character-files-in-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking expiration date for an SSL cert</title>
		<link>http://sudoers.org/2008/12/checking-expiration-date-for-an-ssl-cert/</link>
		<comments>http://sudoers.org/2008/12/checking-expiration-date-for-an-ssl-cert/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 01:17:15 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[sys admin]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=16</guid>
		<description><![CDATA[Here is you how you check whether an SSL cert is valid and hasn't yet expired 1. Retrieve the certificate. 2. Check the expiration date of the certificate. Or you can use ssl-cert-check or check-expire]]></description>
			<content:encoded><![CDATA[<p>Here is you how you check whether an SSL cert is valid and hasn't yet expired</p>
<p>1. Retrieve the certificate.</p>
<pre class="brush: plain; title: ; notranslate">$ echo &quot;&quot; | openssl s_client -connect server:443 &gt; certificate</pre>
<p>2. Check the expiration date of the certificate.</p>
<pre class="brush: plain; title: ; notranslate">
$ openssl x509 -in certificate -noout -enddate
</pre>
<p>Or you can use <a href="http://freshmeat.net/projects/ssl-cert-check/">ssl-cert-check</a> or <a href="http://sial.org/howto/openssl/check-expire/">check-expire<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2008/12/checking-expiration-date-for-an-ssl-cert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing permissions for all directories in folder</title>
		<link>http://sudoers.org/2008/12/changing-permissions-for-all-directories-in-folder/</link>
		<comments>http://sudoers.org/2008/12/changing-permissions-for-all-directories-in-folder/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 06:57:22 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[sys admin]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=13</guid>
		<description><![CDATA[Ever run into a situation where you have a mixture of both files and folders in a directory and you only need to change the permission of the folder? Naturally the first thing that comes to mind is to do something like this But what happens if your folders have spaces? Using find that way [...]]]></description>
			<content:encoded><![CDATA[<p>Ever run into a situation where you have a mixture of both files and folders in a directory and you only need to change the permission of the folder? Naturally the first thing that comes to mind is to do something like this</p>
<pre class="brush: plain; title: ; notranslate">find . -type d -print | xargs chmod 755</pre>
<p>But what happens if your folders have spaces? Using find that way will not escape the spaces instead the solution to this is to use find but in a slightly different manner</p>
<pre class="brush: plain; title: ; notranslate">find . -type d -print0 | xargs -0 chmod 755</pre>
<p>The -print0 tells find to terminate with zero so that whitespaces are recognized and the same goes for xargs as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2008/12/changing-permissions-for-all-directories-in-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taken from Shell-fu</title>
		<link>http://sudoers.org/2008/12/taken-from-shell-fu/</link>
		<comments>http://sudoers.org/2008/12/taken-from-shell-fu/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 22:20:59 +0000</pubDate>
		<dc:creator>limed</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[sys admin]]></category>

		<guid isPermaLink="false">http://sudoers.org/?p=9</guid>
		<description><![CDATA[This is taken from shell-fu.org still a pretty handy one liner though This will delete any packages that are not installed anymore which still has configuration files on the box]]></description>
			<content:encoded><![CDATA[<p>This is taken from shell-fu.org still a pretty handy one liner though</p>
<pre class="brush: plain; title: ; notranslate">aptitude search ~c | awk '{ print $2 }' | xargs aptitude -y purge</pre>
<p>This will delete any packages that are not installed anymore which still has configuration files on the box</p>
]]></content:encoded>
			<wfw:commentRss>http://sudoers.org/2008/12/taken-from-shell-fu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

