<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Terminal Linux</title>
	
	<link>http://terminallinux.org</link>
	<description />
	<lastBuildDate>Mon, 18 Mar 2013 17:33:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/terminallinux" /><feedburner:info uri="terminallinux" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Mass Convert RAW Images into JPEGs</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/5F2qd1BGwrs/</link>
		<comments>http://terminallinux.org/p/104/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 18:12:18 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=104</guid>
		<description><![CDATA[First, you&#8217;ll need to install ufraw-batch: sudo apt-get install ufraw-batch Now, you can easily and quickly dump your RAW images into JPEGs: find . -maxdepth 1 -type f -iname "*.cr2" &#124; while read file do ufraw-batch --wb=camera --exposure=auto \ --out-type=jpeg --compression=90 \ --output="${file%.CR2}.JPG" \ "$file" done The above command will find all files ending in [...]]]></description>
			<content:encoded><![CDATA[<p>First, you&#8217;ll need to install <code>ufraw-batch</code>:</p>

<pre><code>sudo apt-get install ufraw-batch
</code></pre>

<p>Now, you can easily and quickly dump your RAW images into JPEGs:</p>

<pre><code>find . -maxdepth 1 -type f -iname "*.cr2" | while read file do
    ufraw-batch --wb=camera --exposure=auto \
        --out-type=jpeg --compression=90 \
        --output="${file%.CR2}.JPG" \
        "$file"
done
</code></pre>

<p>The above command will find all files ending in CR2 in the current directory and convert them to JPEGs in the same directory.</p>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/5F2qd1BGwrs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/104/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/104/</feedburner:origLink></item>
		<item>
		<title>Converting WMA Music to MP3 with MPlayer and Lame</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/qX3L_rQan-w/</link>
		<comments>http://terminallinux.org/p/101/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 18:06:40 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=101</guid>
		<description><![CDATA[Another quick, hopefully painless tutorial. You can ask MPlayer to dump WMA files into WAV files, which you can then transcode into MP3 files: mplayer "myfile.wma" -vo null -vc dummy -af resample=441000 \ -ao pcm:waveheader \ -ao pcm:file="out.wav" Alternatively, you can write it directly to lame&#8216;s standard input to daisy-chain the operation: mplayer "myfile.wma" -vo [...]]]></description>
			<content:encoded><![CDATA[<p>Another quick, hopefully painless tutorial.</p>

<p>You can ask MPlayer to dump WMA files into WAV files, which you can then transcode into MP3 files:</p>

<pre><code>mplayer "myfile.wma" -vo null -vc dummy -af resample=441000 \
    -ao pcm:waveheader \
    -ao pcm:file="out.wav"
</code></pre>

<p>Alternatively, you can write it directly to <code>lame</code>&#8216;s standard input to daisy-chain the operation:</p>

<pre><code>mplayer "myfile.wma" -vo null -vc dummy -af resample=44100 \
    -ao pcm:waveheader \ 
    -ao pcm:file=&gt;(lame -b 192 -q 0 - "out.mp3")
</code></pre>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/qX3L_rQan-w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/101/</feedburner:origLink></item>
		<item>
		<title>Bash Input and Output Redirection and Piping</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/nNkfL03TrmE/</link>
		<comments>http://terminallinux.org/p/99/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 20:32:29 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[io]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=99</guid>
		<description><![CDATA[Today, we&#8217;re going to talk about Bash and input/output redirection. This is pretty standard stuff for any Unix and Linux user, but there are a few ins and outs that nobody ever told me about. Let&#8217;s just use some examples: Pretty standard stuff, write all standard output to a file: # write the stdout of [...]]]></description>
			<content:encoded><![CDATA[<p>Today, we&#8217;re going to talk about Bash and input/output redirection. This is pretty standard stuff for any Unix and Linux user, but there are a few ins and outs that nobody ever told me about. Let&#8217;s just use some examples:</p>

<p>Pretty standard stuff, write all standard output to a file:</p>

<pre><code># write the stdout of mycommand to myfile.log
mycommand &gt; myfile.log 
</code></pre>

<p>Write all standard output and standard error to a file:</p>

<pre><code># write the stdout and stderr of mycommand to myfile.log
mycommand 2&gt;&amp;1 &gt; myfile.log
</code></pre>

<p>Write standard input to one file and standard error to another file:</p>

<pre><code># write stdout of mycommand to myfile.log and stderr of mycommand to myfile.error.log
mycommand 2&gt; myfile.error.log &gt; myfile.log
</code></pre>

<p><em>Append</em> standard output to a file (not completely overwriting it as above):</p>

<pre><code># append stdout of mycommand to myfile.log
mycommand &gt;&gt; myfile.log
</code></pre>

<p>The same can be done with stderr:</p>

<pre><code># append stderr of mycommand to myfile.error.log
mycommand 2&gt;&gt; myfile.error.log
</code></pre>

<p>You can also force-clobber the file if you <em>really</em> want it to overwrite things:</p>

<pre><code># force-overwrite stdout of mycommand to myfile.log
mycommand &gt;! myfile.log
</code></pre>

<p>Now, let&#8217;s move on to piping.</p>

<p>Instead of writing all standard output to a file, we&#8217;ll print it <em>and</em> write it to a file with <code>tee</code>:</p>

<pre><code># pipe the stdout of mycommand to `tee`, which will print it and write it to myfile.log
mycommand | tee myfile.log
</code></pre>

<p>What about standard error, though? You can redirect standard error to standard out:</p>

<pre><code># pipe the stdout of mycommand (pushing stderror to stdout) to `tee`
mycommand 2&gt;&amp;1 | tee myfile.log
</code></pre>

<p>Or, redux: accomplish that whole standard error redirect in less characters:</p>

<pre><code>mycommand |&amp; tee myfile.log
</code></pre>

<p>And, just for kicks, redirect standard output to standard error:</p>

<pre><code>mycommand &gt;&amp;2 
</code></pre>

<p>As far as Bash i/o redirection goes, that&#8217;s pretty much it. Have fun!</p>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/nNkfL03TrmE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/99/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/99/</feedburner:origLink></item>
		<item>
		<title>Drop or Empty/Truncate all Tables in a MySQL Database</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/oRCIad2iosw/</link>
		<comments>http://terminallinux.org/p/92/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 02:35:38 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=92</guid>
		<description><![CDATA[Unfortunately, no command exists in MySQL to drop or truncate all tables in a database. You can drop or truncate each table in a database one-by-one, but even that is cumbersome, as you can&#8217;t even pass a comma-delimited list of tables to use. There&#8217;s no command like drop all tables;, neither is there a command [...]]]></description>
			<content:encoded><![CDATA[<p>Unfortunately, no command exists in MySQL to drop or truncate all tables in a database. You can drop or truncate each table in a database one-by-one, but even that is cumbersome, as you can&#8217;t even pass a comma-delimited list of tables to use.</p>

<p>There&#8217;s no command like <code>drop all tables;</code>, neither is there a command that will allow you to drop or truncate multiple tables at once like <code>drop table users, addresses, locations;</code>. You&#8217;re left with doing it line by line in a tedious, repetitive manner like so:</p>

<pre><code>drop table users;
drop table addresses;
drop table locations;
</code></pre>

<p>If you have a lot of tables, this simply doesn&#8217;t work.</p>

<p>If you have a Bash-like shell, you can do it in a much more efficient way via the <code>mysql</code> command and the <code>mysqldump</code> command and some regular expression hackery:</p>

<pre><code>mysqldump -u username --password=password --add-drop-table --no-data database_name | grep ^DROP | mysql -u username --password=password database_name
</code></pre>

<p>Winning! If you want to do the same thing for truncating all databases, look no further:</p>

<pre><code>mysqldump -u username --password=password --add-drop-table --no-data database_name | grep ^DROP | sed "s:^DROP TABLE IF EXISTS:TRUNCATE TABLE:g" | mysql -u username --password=password database_name
</code></pre>

<p>Now that you&#8217;ve emptied your database, it&#8217;s time to weep that you forgot to make a backup <img src='http://terminallinux.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<p><small><em> via <a href="http://www.thingy-ma-jig.co.uk/blog/10-10-2006/mysql-drop-all-tables">thingy-ma-jig.co.uk</em></small></p>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/oRCIad2iosw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/92/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/92/</feedburner:origLink></item>
		<item>
		<title>X Clipboard Magic Hackery</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/Z4jCvdasFIs/</link>
		<comments>http://terminallinux.org/p/90/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 01:12:33 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Hackery]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[hackery]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[x]]></category>
		<category><![CDATA[xclip]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=90</guid>
		<description><![CDATA[Dramatic title, no? In any case, you may or may not know that you can do some really awesome stuff using the X clipboard in Linux. For example, one of the things I often find myself doing something like this: cat something.log &#124; xclip -selection clipboard This basically copies the file contents of something.log to [...]]]></description>
			<content:encoded><![CDATA[<p>Dramatic title, no? In any case, you may or may not know that you can do some really <em>awesome</em> stuff using the X clipboard in Linux.</p>

<p>For example, one of the things I often find myself doing something like this:</p>

<pre><code>cat something.log | xclip -selection clipboard
</code></pre>

<p>This basically copies the file contents of <code>something.log</code> to the X clipboard.</p>

<p>For <a href="http://stackoverflow.com">stackoverflow</a> junkies, you can use a nice little <code>sed</code> command to tab the output so you&#8217;ll be able to directly paste code into a question and have it formatted in Markdown properly:</p>

<pre><code>cat ProblemChild.java | sed 's:^:\t:g' | xclip -selection clipboard
</code></pre>

<p>The above will insert a tab before each line as it copies <code>ProblemChild.java</code> to the clipboard.</p>

<p>Let&#8217;s finish off with some awesome hackery. What if you&#8217;ve copied something to the clipboard but need to format it for StackOverflow? Well, it&#8217;s really not too hard:</p>

<pre><code>xclip -o | sed 's:^:\t:g' | xclip -selection clipboard
</code></pre>

<p>This dumps the clipboard to standard out, inserts a tab on each line at the beginning, then fills the clipboard with the new content. Talk about winning!</p>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/Z4jCvdasFIs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/90/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/90/</feedburner:origLink></item>
		<item>
		<title>Convert a MP3 to a WAV File</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/66qwDRhqeTs/</link>
		<comments>http://terminallinux.org/p/87/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 19:39:38 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[wav]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=87</guid>
		<description><![CDATA[There are a ton of ways to convert a MP3 file to a WAV file, so take your pick: mpg123 -w output.wav input.mp3 Or, if you&#8217;d prefer to use lame: lame --decode input.mp3 output.wav Perhaps you live on the wild side and would like to use FFMPEG: ffmpeg -i input.mp3 output.wav As you can see, [...]]]></description>
			<content:encoded><![CDATA[<p>There are a ton of ways to convert a MP3 file to a WAV file, so take your pick:</p>

<pre><code>mpg123 -w output.wav input.mp3
</code></pre>

<p>Or, if you&#8217;d prefer to use <code>lame</code>:</p>

<pre><code>lame --decode input.mp3 output.wav
</code></pre>

<p>Perhaps you live on the wild side and would like to use FFMPEG:</p>

<pre><code>ffmpeg -i input.mp3 output.wav
</code></pre>

<p>As you can see, it&#8217;s pretty darn simple to do, so have at it!</p>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/66qwDRhqeTs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/87/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/87/</feedburner:origLink></item>
		<item>
		<title>Resample and Reencode All MP3 Files in a Directory</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/ICh-y2Xj3aY/</link>
		<comments>http://terminallinux.org/p/84/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 06:57:37 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[id3]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[sample-rate]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=84</guid>
		<description><![CDATA[This is going to be a fairly short and simple post, wherein we&#8217;re going to simply drop into Bash and reencode some files. Let&#8217;s do it: find . -type f -iname "*.mp3" &#124; while read file do mv "$file" "${file}.old" &#38;&#38; \ lame --mp3input -q 0 -b 320 --resample 44.1 "${file}.old" "$file" &#38;&#38; \ id3cp [...]]]></description>
			<content:encoded><![CDATA[<p>This is going to be a fairly short and simple post, wherein we&#8217;re going to simply drop into Bash and reencode some files. Let&#8217;s do it:</p>

<pre><code>find . -type f -iname "*.mp3" | while read file 
do
    mv "$file" "${file}.old" &amp;&amp; \
    lame --mp3input -q 0 -b 320 --resample 44.1 "${file}.old" "$file" &amp;&amp; \
    id3cp "${file}.old" "$file" &amp;&amp; \
    mv "${file}.old" "/tmp/${file%.old} 
done
</code></pre>

<p>It&#8217;s pretty simple logic. We chain everything together with &#8220;&amp;&amp;&#8221; so that if any one piece in the puzzle fails, it&#8217;ll stop executing. First, 
we move the file to it&#8217;s name plus &#8220;.old&#8221; (so &#8220;01 &#8211; The Early Days.mp3&#8243; becomes &#8220;01 &#8211; The Early Days.mp3.old&#8221;). Then, if that works
we convert the file with <code>lame</code>. We force <code>lame</code> to assume that it&#8217;s an MP3 file, because it is, set it to highest quality and a constant
bitrate of 320, resample it to 44.1kHz, and rename the output to the original file name. Then, if that worked, we copy all ID3 tags from the
old file to the new one. When that&#8217;s done, we move the old file to the <code>/tmp</code> directory so we can delete it if everything went well or restore
it if we need to.</p>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/ICh-y2Xj3aY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/84/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/84/</feedburner:origLink></item>
		<item>
		<title>[Ubuntu] Redmine+Gitosis – An Awesome Project Management Solution</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/zeLHafWXxag/</link>
		<comments>http://terminallinux.org/p/79/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 00:35:50 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=79</guid>
		<description><![CDATA[When it comes to project management, there are a lot of awesome offerings out there. When you&#8217;re looking for something free, your list gets a little smaller. Redmine is an awesome project management solution written in Ruby. It features bug/issue/time tracking, multiple users and projects, repository watching, forums, wiki, documents, and more. Gitosis is a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://terminallinux.org/u/2011/04/Redmine-Logo-CyberSprocket-Composite_300x300_png8.png"><img class="alignleft size-full wp-image-80" title="Redmine Logo" src="http://terminallinux.org/u/2011/04/Redmine-Logo-CyberSprocket-Composite_300x300_png8.png" alt="" width="150" height="150" /></a>When it comes to project management, there are a lot of awesome offerings out there. When you&#8217;re looking for something free, your list gets a little smaller. Redmine is an awesome project management solution written in Ruby. It features bug/issue/time tracking, multiple users and projects, repository watching, forums, wiki, documents, and more. Gitosis is a Git-hosting server to make it easy for you to put your Git repositories online. Put &#8216;em both together and you&#8217;ve got a really powerful way to manage your projects, either for yourself or for your company. Let&#8217;s get to work.</p>

<p><span id="more-79"></span></p>

<p>First, let&#8217;s install everything we&#8217;ll need:</p>

<pre><code>sudo apt-get install redmine redmine-sqlite libapache2-mod-passenger gitosis git-core
</code></pre>

<p>Note: you can replace <code>redmine-sqlite</code> above with either <code>redmine-mysql</code> or <code>redmine-pgsql</code> to use those databases rather than SQLite. I prefer SQLite, so that&#8217;s what I&#8217;m sticking to.</p>

<h2>Redmine</h2>

<p>Now let&#8217;s focus on getting Redmine installed. Let&#8217;s make it available via Apache with the Passenger module. First, symlink your Redmine configuration to exist in your web server. My web server&#8217;s root directory is at <code>/var/www</code>, so I&#8217;ll symlink mine to <code>/var/www/redmine</code>:</p>

<pre><code>sudo ln -s /usr/share/redmine/public /var/www/redmine
</code></pre>

<p>Now, let&#8217;s edit Passenger so that the module runs as the right user. Edit the <code>/etc/apache2/mods-available/passenger.conf</code> file, adding the following line between the <code>&lt;IfModule ...&gt;</code> tags:</p>

<pre><code>PassengerDefaultUser www-data
</code></pre>

<p>Save it, exit and let&#8217;s keep going. Now, configure the Redmine location in your Apache virtual host by adding the following few lines into your virtual host definition file at <code>/etc/apache2/sites-available/default</code>:</p>

<pre><code>&lt;Directory /var/www/redmine&gt;
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on
&lt;/Directory&gt;
</code></pre>

<p>Now, enable the Passenger module and restart Apache:</p>

<pre><code>sudo a2enmod passenger
sudo /etc/init.d/apache2 restart
</code></pre>

<p>Finally, visit <code>localhost/redmine</code> in your browser and login using &#8220;admin&#8221; as a username and &#8220;admin&#8221; as a password. Coolness. Now, onto Gitosis.</p>

<h2>Gitosis</h2>

<p>We&#8217;ve already installed Gitosis using the command above. Now, let&#8217;s configure it for use.</p>

<p>First, reconfigure Gitosis to use your RSA SSH key. If you don&#8217;t have SSH set up, you should do that first so that this key exists.</p>

<pre><code>sudo -H -u gitosis gitosis-init &lt; ~/.ssh/id_rsa.pub
</code></pre>

<p>Now, let&#8217;s check out the Gitosis admin repository, so we can make our changes to the configuration settings.</p>

<pre><code>git clone gitosis@yourserver.com:gitosis-admin.git
</code></pre>

<p>Note: if you&#8217;ve really locked down your SSH server and only permit certain users from connecting, you&#8217;ll have to add the user &#8220;gitosis&#8221; to your <code>AllowUsers</code> list in <code>/etc/ssh/sshd_config</code>.</p>

<p>How do we add a project? All we really need to do is to add the following to the <code>gitosis-admin/gitosis.conf</code> file:</p>

<pre><code>[group {PROJECT_NAME}]
writable = {PROJECT_NAME}
members = {KEYFILE_NAME}
</code></pre>

<p>What this really translates to is something like this:</p>

<pre><code>[group android-project]
writable = android-project
members = mykeyfile@myhost.com
</code></pre>

<p>Voila! Simply <code>git add *</code>, <code>git commit</code>, and <code>git push</code> to commit your changes. To add a remote origin to your existing Git projects, run the following command in the basedir of your Git repository:</p>

<pre><code>git remote add origin gitosis@localhost:android-project.git
git push origin master
</code></pre>

<p>Now, simply point Redmine at your repository&#8217;s location, which follows the following pattern:</p>

<pre><code>/srv/gitosis/repositories/{REPO_NAME}.git
</code></pre>

<p>or, in the real world:</p>

<pre><code>/srv/gitosis/repositories/android-project.git
</code></pre>

<p>And we&#8217;re done! Pretty easy, huh?</p>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/zeLHafWXxag" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/79/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/79/</feedburner:origLink></item>
		<item>
		<title>[Bash] Silently start background processes with ‘fart’</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/CQjnOywgNGc/</link>
		<comments>http://terminallinux.org/p/76/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 03:27:09 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fart]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[wizardry]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=76</guid>
		<description><![CDATA[Perhaps it&#8217;s not the best choice of names for a script like this, but I wrote this script at a late hour, so cut me some slack &#8216;fart&#8217; will simply start a process, redirect all of its output (standard output and standard error) into oblivion (/dev/null), fork it to the background, and disown it. What [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps it&#8217;s not the best choice of names for a script like this, but I wrote this script at a late hour, so cut me some slack <img src='http://terminallinux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8216;fart&#8217; will simply start a process, redirect all of its output (standard output and standard error) into oblivion (/dev/null), fork it to the background, and disown it. What this means is that you&#8217;re essentially truly creating a background process that will run independently of the current shell and will only be killed once it terminates or once you terminate it yourself. When you&#8217;re connecting to a computer over SSH, this script will save you a lot of time, as it&#8217;ll disown your processes so that when you disconnect, they&#8217;ll keep running. Here it is:</p>

<pre><code>#!/bin/bash
$@ &gt; /dev/null 2&gt;&amp;1 &amp;
disown $!
</code></pre>

<p>I know it&#8217;s not much, but let&#8217;s look at an example. Suppose you wanted to start &#8216;gedit&#8217; in the background. Here&#8217;s how you&#8217;d do it with &#8216;fart&#8217;:</p>

<pre><code>fart gedit
</code></pre>

<p>Here&#8217;s how you&#8217;d do it without &#8216;fart&#8217;:</p>

<pre><code>gedit &gt; /dev/null 2&gt;&amp;1 &amp; \
disown $!
</code></pre>

<p>Much easier. Enjoy. Make sure you make &#8216;fart&#8217; executable and put it on your path via the following:</p>

<pre><code>chmod +x fart 
mv fart /usr/local/bin 
</code></pre>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/CQjnOywgNGc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/76/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/76/</feedburner:origLink></item>
		<item>
		<title>[Networking] Detect Open Ports on a Remote Computer Using ‘netcat’</title>
		<link>http://feedproxy.google.com/~r/terminallinux/~3/39d9FJcDw7k/</link>
		<comments>http://terminallinux.org/p/71/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 19:36:22 +0000</pubDate>
		<dc:creator>TK</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[port-scanning]]></category>

		<guid isPermaLink="false">http://terminallinux.org/?p=71</guid>
		<description><![CDATA[Ever needed to detect open ports on a remote machine for purely altruistic reasons? Once again, netcat to the rescue! You can easily scan a range of ports on a given IP address using our networking swiss army knife. You want to find out if any ports are open between ports 1024 and 2048 on [...]]]></description>
			<content:encoded><![CDATA[<p>Ever needed to detect open ports on a remote machine for purely <em>altruistic</em> reasons? Once again, <a href="http://linux.die.net/man/1/nc">netcat</a> to the rescue! You can easily scan a range of ports on a given IP address using our networking swiss army knife.</p>

<p>You want to find out if any ports are open between ports 1024 and 2048 on another computer on your network. With the legendary knowledge of <a href="http://linux.die.net/man/1/nc">netcat</a> that you have, you enter the following in your terminal:</p>

<pre><code>netcat -z 192.168.1.5 1024-2048
</code></pre>

<p>Note that this does actually take some time to complete. Alternatively, you can use the short form of the above:</p>

<pre><code>nc -z 192.168.1.5 1024-2048
</code></pre>

<p>It&#8217;s as easy as that. <a href="http://linux.die.net/man/1/nc">netcat</a> will dump out any info on ports it finds that are open.</p>
<img src="http://feeds.feedburner.com/~r/terminallinux/~4/39d9FJcDw7k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://terminallinux.org/p/71/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://terminallinux.org/p/71/</feedburner:origLink></item>
	</channel>
</rss>
