<?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>reZo Labs &#187; GNU/Linux</title>
	<atom:link href="http://rezolabs.com/topic/gnu-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://rezolabs.com</link>
	<description>Yet another nerd blog about GNU/Linux and Web Development!</description>
	<lastBuildDate>Fri, 09 Jul 2010 04:55:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Debian GNU/Linux Lenny Released</title>
		<link>http://rezolabs.com/gnu-linux/debian-gnulinux-lenny-released/</link>
		<comments>http://rezolabs.com/gnu-linux/debian-gnulinux-lenny-released/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 20:35:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[5.0]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[new distribution]]></category>
		<category><![CDATA[Released]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=111</guid>
		<description><![CDATA[After 22 months of constant development, Debian Lenny stable is finally released! Debian Lenny is the latest from the Debian project, which is a GNU/Linux distribution. Debian Lenny supports a total of twelve processor architectures and includes the KDE, GNOME, Xfce, and LXDE desktop environments.

Debian GNU/Linux runs on computers ranging from palmtops and handheld systems to supercomputers, and on nearly everything in between. A total of twelve architectures are supported: Sun SPARC (sparc), HP Alpha (alpha), Motorola/IBM PowerPC (powerpc), Intel IA-32 (i386), IA-64 (ia64), HP PA-RISC (hppa), MIPS (mips, mipsel), ARM (arm, armel), IBM S/390 (s390), and AMD64 and Intel EM64T (amd64).]]></description>
			<content:encoded><![CDATA[<p>After 22 months of constant development, Debian Lenny stable is finally released! Debian Lenny is the latest from the Debian project, which is a GNU/Linux distribution. Debian Lenny supports a total of twelve processor architectures and includes the KDE, GNOME, Xfce, and LXDE desktop environments.</p>
<p>Debian GNU/Linux runs on computers ranging from palmtops and handheld systems to supercomputers, and on nearly everything in between. A total of twelve architectures are supported: Sun SPARC (sparc), HP Alpha (alpha), Motorola/IBM PowerPC (powerpc), Intel IA-32 (i386), IA-64 (ia64), HP PA-RISC (hppa), MIPS (mips, mipsel), ARM (arm, armel), IBM S/390 (s390), and AMD64 and Intel EM64T (amd64).</p>
<p>To upgrade to Lenny, you&#8217;ll need to update your /etc/apt/source.list file, which contains information about which repository you download your update packages from. My source.list file being New Zealand based, it&#8217;s a good idea to change it to your country, for faster downloads. Note, # is a commented out line.</p>
<pre>
deb http://ftp.nz.debian.org/debian/ lenny main
deb-src http://ftp.nz.debian.org/debian/ lenny main
deb http://security.debian.org/ lenny/updates main contrib
deb http://ftp.us.debian.org/debian lenny main

# non-free priority software
#deb http://ftp.nz.debian.org/debian/ lenny main non-free contrib
</pre>
<p>From there, depending on what you use, you&#8217;ll need to `apt-get update; apt-get dist-upgrade; apt-get upgrade`, or if your using aptitude instead, `aptitude update; aptitude full-upgrade`.</p>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/debian-gnulinux-lenny-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>INI Parser</title>
		<link>http://rezolabs.com/gnu-linux/ini-parser/</link>
		<comments>http://rezolabs.com/gnu-linux/ini-parser/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 13:34:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[ini]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SDL]]></category>
		<category><![CDATA[settings]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=102</guid>
		<description><![CDATA[As a current project, I'm developing a small game in C++ using the SDL API, the project is going well, so I thought I'd share some code. The following is a small parser to parse the game settings file. Target syntax for the INI file is within the header comment.]]></description>
			<content:encoded><![CDATA[<p>As a current project, I&#8217;m developing a small game in C++ using the SDL API, the project is going well, so I thought I&#8217;d share some code. The following is a small parser to parse the game settings file. Target syntax for the INI file is within the header comment.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
 * Parse and replace (set) settings within settings.ini
 * Syntax of settings.ini, command = value, ; comment
 *
 * @author  reZo &lt;reZo@rezolabs.com&gt;
 * @license GNU GPL (latest version)
 */</span>
&nbsp;
class Settings <span style="color: #009900;">&#123;</span>
&nbsp;
   private<span style="color: #339933;">:</span>
      <span style="color: #666666; font-style: italic;">// settings map to store command / value</span>
      std<span style="color: #339933;">::</span><span style="color: #202020;">map</span><span style="color: #339933;">&lt;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span><span style="color: #339933;">,</span> std<span style="color: #339933;">::</span><span style="color: #202020;">string</span><span style="color: #339933;">&gt;</span> settings<span style="color: #339933;">;</span>
      <span style="color: #666666; font-style: italic;">// input file descriptor</span>
      std<span style="color: #339933;">::</span><span style="color: #202020;">ifstream</span> iSettings<span style="color: #339933;">;</span>
      <span style="color: #666666; font-style: italic;">// output file descriptor</span>
      std<span style="color: #339933;">::</span><span style="color: #202020;">ofstream</span> oSettings<span style="color: #339933;">;</span>
      <span style="color: #666666; font-style: italic;">// filename</span>
      std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> filename<span style="color: #339933;">;</span>
      <span style="color: #993333;">void</span> parse <span style="color: #009900;">&#40;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> line<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   public<span style="color: #339933;">:</span>
      <span style="color: #993333;">void</span> load <span style="color: #009900;">&#40;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> file<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #993333;">void</span> set <span style="color: #009900;">&#40;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> command<span style="color: #339933;">,</span> std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> value<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> get <span style="color: #009900;">&#40;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> command<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> Settings<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 * Open file for parsing
 *
 * @param std::string file filename to open
 */</span>
&nbsp;
<span style="color: #993333;">void</span> Settings<span style="color: #339933;">::</span><span style="color: #202020;">load</span> <span style="color: #009900;">&#40;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> file<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> line<span style="color: #339933;">;</span>
   filename <span style="color: #339933;">=</span> file<span style="color: #339933;">;</span>
&nbsp;
   iSettings.<span style="color: #202020;">open</span> <span style="color: #009900;">&#40;</span>filename.<span style="color: #202020;">data</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> std<span style="color: #339933;">::</span><span style="color: #202020;">ios</span><span style="color: #339933;">::</span><span style="color: #202020;">in</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>iSettings.<span style="color: #202020;">is_open</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>iSettings.<span style="color: #202020;">eof</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      getline <span style="color: #009900;">&#40;</span>iSettings<span style="color: #339933;">,</span> line<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      parse <span style="color: #009900;">&#40;</span>line<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   iSettings.<span style="color: #202020;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 * Get value from settings map&lt;std::string, std::string&gt;
 *
 * @param  std::string commmand name of command of which value to return
 * @return std::string value
 */</span>
&nbsp;
std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> Settings<span style="color: #339933;">::</span><span style="color: #202020;">get</span> <span style="color: #009900;">&#40;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> command<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #b1b100;">return</span> settings<span style="color: #009900;">&#91;</span>command<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 * Use iterator object from map object to compare command index std::string
 *
 * @param std::string command holds command to change value of
 * @param std::string value   value command will be replaced with
 */</span>
&nbsp;
<span style="color: #993333;">void</span> Settings<span style="color: #339933;">::</span><span style="color: #202020;">set</span> <span style="color: #009900;">&#40;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> command<span style="color: #339933;">,</span> std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> value<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   oSettings.<span style="color: #202020;">open</span> <span style="color: #009900;">&#40;</span>filename.<span style="color: #202020;">data</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> std<span style="color: #339933;">::</span><span style="color: #202020;">ios</span><span style="color: #339933;">::</span><span style="color: #202020;">out</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   std<span style="color: #339933;">::</span><span style="color: #202020;">map</span><span style="color: #339933;">&lt;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span><span style="color: #339933;">,</span> std<span style="color: #339933;">::</span><span style="color: #202020;">string</span><span style="color: #339933;">&gt;::</span><span style="color: #202020;">iterator</span> line<span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>line <span style="color: #339933;">=</span> settings.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> line <span style="color: #339933;">!=</span> settings.<span style="color: #202020;">end</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> line<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">*</span>line<span style="color: #009900;">&#41;</span>.<span style="color: #202020;">first</span><span style="color: #009900;">&#41;</span>.<span style="color: #202020;">compare</span><span style="color: #009900;">&#40;</span>command<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span>
         oSettings <span style="color: #339933;">&lt;&lt;</span> command  <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot; = &quot;</span> <span style="color: #339933;">&lt;&lt;</span> value<span style="color: #339933;">;</span>
      <span style="color: #b1b100;">else</span>
         oSettings <span style="color: #339933;">&lt;&lt;</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">*</span>line<span style="color: #009900;">&#41;</span>.<span style="color: #202020;">first</span> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot; = &quot;</span> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">*</span>line<span style="color: #009900;">&#41;</span>.<span style="color: #202020;">second</span> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   settings<span style="color: #009900;">&#91;</span>command<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> value<span style="color: #339933;">;</span>
&nbsp;
   oSettings.<span style="color: #202020;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 * Parse command and value from @param std::string line into settings map&lt;std::string,
 * std::string&gt;
 *
 * @param std::string line the line to parse
 *
 * Uses ; for comment
 */</span>
&nbsp;
<span style="color: #993333;">void</span> Settings<span style="color: #339933;">::</span><span style="color: #202020;">parse</span> <span style="color: #009900;">&#40;</span>std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> line<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>line.<span style="color: #202020;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span>.<span style="color: #202020;">compare</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">||</span> line.<span style="color: #202020;">compare</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span>
      <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
&nbsp;
   std<span style="color: #339933;">::</span><span style="color: #993333;">string</span> command<span style="color: #339933;">,</span> value<span style="color: #339933;">;</span>
   std<span style="color: #339933;">::</span><span style="color: #993333;">string</span><span style="color: #339933;">::</span><span style="color: #202020;">size_type</span> location<span style="color: #339933;">;</span>
&nbsp;
   location <span style="color: #339933;">=</span> line.<span style="color: #202020;">find</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot; = &quot;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>location <span style="color: #339933;">!=</span> std<span style="color: #339933;">::</span><span style="color: #993333;">string</span><span style="color: #339933;">::</span><span style="color: #202020;">npos</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      command <span style="color: #339933;">=</span> line.<span style="color: #202020;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> location<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      value <span style="color: #339933;">=</span> line.<span style="color: #202020;">substr</span><span style="color: #009900;">&#40;</span>location <span style="color: #339933;">+</span> <span style="color: #0000dd;">3</span><span style="color: #339933;">,</span> line.<span style="color: #202020;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   settings<span style="color: #009900;">&#91;</span>command<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> value<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/ini-parser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VIM Run Command (~/.vimrc)</title>
		<link>http://rezolabs.com/gnu-linux/vim-run-command-vimrc/</link>
		<comments>http://rezolabs.com/gnu-linux/vim-run-command-vimrc/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 09:13:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[run command]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[wiki]]></category>
		<category><![CDATA[~/.vimrc]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=88</guid>
		<description><![CDATA[Yes, yet another VIM Run Command file (~/.vimrc). Enough said, read the comments for information on the commands if needed. Use it as you please, feel free to change anything to suit your needs.

Also, a nice resource for tips and tricks for better and easier VIM usage is http://vim.wikia.com/wiki/Main_Page.]]></description>
			<content:encoded><![CDATA[<p>Yes, yet another VIM Run Command file (~/.vimrc). Enough said, read the comments for information on the commands if needed. Use it as you please, feel free to change anything to suit your needs.</p>
<p>Also, a nice resource for tips and tricks for better and easier VIM usage is <a href="http://vim.wikia.com/wiki/Main_Page">http://vim.wikia.com/wiki/Main_Page</a>.</p>
<pre>" turn line numbers on
set number

" syntax on in terminals which can display color
if has('syntax') &amp;&amp; (&amp;t_Co &gt; 2)
syntax on
endif

" set buffer history (i like large ints)
set history=500

" enable mnouse all the time (excluding tty's of cause)
set mouse=a

" no wrapping or hiphopping
set nowrap

" use indents of 3 spaces, and have them copied down lines:
set shiftwidth=3
set shiftround
set expandtab
set autoindent
set tabstop=3

set formatoptions-=t
set textwidth=79

filetype on

autocmd FileType c,cpp,slang set cindent

set et
set sw=3
set smarttab

set ch=2

" indent blank lines!
imap &lt;CR&gt; &lt;CR&gt; &lt;BS&gt;

" firefox like tabbing
" nmap &lt;C-w&gt; :wq&lt;CR&gt;
" nmap &lt;C-x&gt; :q&lt;CR&gt;
nmap &lt;C-n&gt; :tabn&lt;CR&gt;
nmap &lt;C-p&gt; :tabp&lt;CR&gt;
nmap &lt;C-t&gt; :tabnew&lt;CR&gt;

" imap &lt;C-w&gt; &lt;ESC&gt;:wq&lt;CR&gt;
imap &lt;C-n&gt; &lt;ESC&gt;:tabn&lt;CR&gt;
imap &lt;C-p&gt; &lt;ESC&gt;:tabp&lt;CR&gt;
imap &lt;C-t&gt; &lt;ESC&gt;:tabnew&lt;CR&gt;

" control + o for save
imap &lt;C-o&gt; &lt;ESC&gt;:w&lt;CR&gt;i&lt;right&gt;
map &lt;C-o&gt; :w&lt;CR&gt;i

" easy undo

imap &lt;C-u&gt; &lt;ESC&gt;:u&lt;CR&gt;
map &lt;C-u&gt; :u&lt;CR&gt;

set nocompatible
filetype on
filetype plugin on</pre>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/vim-run-command-vimrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fbsetbg Wallpaper Rotation</title>
		<link>http://rezolabs.com/gnu-linux/fbsetbg-wallpaper-rotation-2/</link>
		<comments>http://rezolabs.com/gnu-linux/fbsetbg-wallpaper-rotation-2/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 00:10:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[fbsetbg]]></category>
		<category><![CDATA[fluxbox]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[wallpaper]]></category>
		<category><![CDATA[wallpaper changer]]></category>
		<category><![CDATA[xfce]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=71</guid>
		<description><![CDATA[Bash wallpaper rotation is a simple wallpaper changer for GNU/Linux. It doesn't work in every environment, but one's which use fbsetbg to set the wallpaper. The usage of the script is fairly basic, you can set the delay timer in which wallpapers are changed, as well as demonizing the script or not.]]></description>
			<content:encoded><![CDATA[<p>Bash wallpaper rotation is a simple wallpaper changer for GNU/Linux. It doesn&#8217;t work in every environment, but one&#8217;s which use fbsetbg to set the wallpaper. The usage of the script is fairly basic, you can set the delay timer in which wallpapers are changed, as well as demonizing the script or not.</p>
<pre lang="c" lines="0">#/bin/bash

if [ -z "$1" ]
then
        echo "usage: $0 (sleep timer) (d|-d|--daemon)"
        exit 1
fi

daemon="no"

for i in "$@"
do
        if [ "$i" == "d" ] || [ "$i" == "-d" ] || [ "$i" == "--daemon" ]
        then
                daemon="yes"
        else
                time=$i
        fi
done

if [ "$daemon" == "yes" ]
then
        $0 $time &#038;> /dev/null &#038;
        exit 0
fi

while [ 1 == 1 ]
do
        for i in `ls | grep -v ${0:2:${#0}}`
        do
                fbsetbg $i
                sleep $time
        done
done</pre>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/fbsetbg-wallpaper-rotation-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN Commit</title>
		<link>http://rezolabs.com/gnu-linux/svn-commit/</link>
		<comments>http://rezolabs.com/gnu-linux/svn-commit/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 05:04:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pysvn]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=50</guid>
		<description><![CDATA[The main purpose of SVN Commit is to save you time commiting any file(s) to the target SVN repository. What SVNc does, it parses files within an SVN checkout for a "commit comment". Once this comment is found, it does certian checks to see if the file has changed, if so, it then commits the file back to it's SVN repository, otherwise, moves to the next.

It's a good program to use alone with a task scheduler (Windows) or a Cron job (GNU/Linux).]]></description>
			<content:encoded><![CDATA[<p>The main purpose of SVN Commit is to save you time commiting any file(s) to the target SVN repository. What SVNc does, it parses files within an SVN checkout for a &#8220;commit comment&#8221;. Once this comment is found, it does certian checks to see if the file has changed, if so, it then commits the file back to it&#8217;s SVN repository, otherwise, moves to the next.</p>
<p>It&#8217;s a good program to use alone with a task scheduler (Windows) or a Cron job (GNU/Linux).</p>
<p>Programmed in Python, currently in alpha stages. It&#8217;s a small bit buggy, and new releases will be posted soon, maybe even a GUI. Feel free to make any suggestions, complaints, bug fixes, patches and what not.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">optparse</span> <span style="color: #ff7700;font-weight:bold;">import</span> OptionParser
<span style="color: #ff7700;font-weight:bold;">from</span> hashlib <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">md5</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>, <span style="color: #dc143c;">glob</span>, <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">re</span>, MySQLdb, pysvn
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> svnc:
&nbsp;
   <span style="color: #483d8b;">&quot;&quot;&quot;
   set default arguments for CLI variables
   &quot;&quot;&quot;</span>
&nbsp;
   <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span> <span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
      <span style="color: #008000;">self</span>.<span style="color: black;">options</span> = <span style="color: #008000;">False</span>
      <span style="color: #008000;">self</span>.<span style="color: #008000;">list</span> = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
      <span style="color: #008000;">self</span>.<span style="color: black;">parseCLI</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
      <span style="color: #008000;">self</span>.<span style="color: black;">db</span> = <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span>
&nbsp;
      <span style="color: #808080; font-style: italic;"># TODO get connection information from self.parseCLI() CLI args</span>
      db = MySQLdb.<span style="color: black;">connect</span><span style="color: black;">&#40;</span>host   = <span style="color: #483d8b;">'localhost'</span>,
                           <span style="color: #dc143c;">user</span>   = <span style="color: #483d8b;">'svnc'</span>,
                           passwd = <span style="color: #483d8b;">'svnc'</span>,
                           db     = <span style="color: #483d8b;">'svnc'</span><span style="color: black;">&#41;</span>
&nbsp;
      <span style="color: #008000;">self</span>.<span style="color: black;">cursor</span> = db.<span style="color: black;">cursor</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
   <span style="color: #483d8b;">&quot;&quot;&quot;
   parse CLI arguments
   # FIXME looping multiple times
   &quot;&quot;&quot;</span>
&nbsp;
   <span style="color: #ff7700;font-weight:bold;">def</span> parseCLI <span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
      <span style="color: #dc143c;">parser</span> = OptionParser<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
      <span style="color: #dc143c;">parser</span>.<span style="color: black;">add_option_version</span> = <span style="color: #483d8b;">'pre-alpha'</span>
      <span style="color: #dc143c;">parser</span>.<span style="color: black;">add_option</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-d'</span>, <span style="color: #483d8b;">'--daemon'</span>, dest=<span style="color: #483d8b;">'daemon'</span>, default=<span style="color: #008000;">False</span>, metavar=<span style="color: #483d8b;">'(yes|no)'</span>, <span style="color: #008000;">help</span>=<span style="color: #483d8b;">'run as daemon'</span><span style="color: black;">&#41;</span>
      <span style="color: #dc143c;">parser</span>.<span style="color: black;">add_option</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-c'</span>, <span style="color: #483d8b;">'--checkout'</span>, dest=<span style="color: #483d8b;">'checkout'</span>, metavar=<span style="color: #483d8b;">'/path/to/checkout/'</span>, <span style="color: #008000;">help</span>=<span style="color: #483d8b;">'path to repository checkout'</span><span style="color: black;">&#41;</span>
      <span style="color: #dc143c;">parser</span>.<span style="color: black;">add_option</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-e'</span>, <span style="color: #483d8b;">'--extensions'</span>, dest=<span style="color: #483d8b;">'extensions'</span>, metavar=<span style="color: #483d8b;">'ext,ext,...'</span>, <span style="color: #008000;">help</span>=<span style="color: #483d8b;">'extensions to check'</span><span style="color: black;">&#41;</span>
      <span style="color: #dc143c;">parser</span>.<span style="color: black;">add_option</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-u'</span>, <span style="color: #483d8b;">'--username'</span>, dest=<span style="color: #483d8b;">'username'</span>, metavar=<span style="color: #483d8b;">'username'</span>, <span style="color: #008000;">help</span>=<span style="color: #483d8b;">'username for svn repository login'</span><span style="color: black;">&#41;</span>
      <span style="color: #dc143c;">parser</span>.<span style="color: black;">add_option</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-p'</span>, <span style="color: #483d8b;">'--password'</span>, dest=<span style="color: #483d8b;">'password'</span>, metavar=<span style="color: #483d8b;">'password'</span>, <span style="color: #008000;">help</span>=<span style="color: #483d8b;">'password for svn repository login'</span><span style="color: black;">&#41;</span>
      <span style="color: #dc143c;">parser</span>.<span style="color: black;">add_option</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-q'</span>, <span style="color: #483d8b;">'--quiet'</span>, dest=<span style="color: #483d8b;">'quiet'</span>, metavar=<span style="color: #483d8b;">'quiet'</span>, <span style="color: #008000;">help</span>=<span style="color: #483d8b;">'display nothing to stdout'</span><span style="color: black;">&#41;</span>
      <span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">options</span>, args<span style="color: black;">&#41;</span> = <span style="color: #dc143c;">parser</span>.<span style="color: black;">parse_args</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
      <span style="color: #ff7700;font-weight:bold;">try</span>:
         <span style="color: #008000;">self</span>.<span style="color: black;">options</span>.<span style="color: black;">extensions</span> = <span style="color: #008000;">self</span>.<span style="color: black;">options</span>.<span style="color: black;">extensions</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">','</span><span style="color: black;">&#41;</span>
      <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">AttributeError</span>:
         <span style="color: #dc143c;">parser</span>.<span style="color: black;">print_help</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
         <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
   <span style="color: #483d8b;">&quot;&quot;&quot;
   get value parsed from CLI
   &quot;&quot;&quot;</span>
&nbsp;
   <span style="color: #ff7700;font-weight:bold;">def</span> get <span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, key<span style="color: black;">&#41;</span>:
      <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">eval</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;self.options.%s&quot;</span> <span style="color: #66cc66;">%</span> key<span style="color: black;">&#41;</span>
&nbsp;
   <span style="color: #ff7700;font-weight:bold;">def</span> scan <span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, path<span style="color: black;">&#41;</span>:
      files = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
      <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">listdir</span><span style="color: black;">&#40;</span>path<span style="color: black;">&#41;</span>:
         name = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>path, i<span style="color: black;">&#41;</span>
         <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">isfile</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'%s'</span> <span style="color: #66cc66;">%</span> name<span style="color: black;">&#41;</span>:
            <span style="color: #808080; font-style: italic;"># check for extensions</span>
            <span style="color: #ff7700;font-weight:bold;">for</span> extension <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">self</span>.<span style="color: black;">options</span>.<span style="color: black;">extensions</span>:
               <span style="color: #ff7700;font-weight:bold;">if</span>  name<span style="color: black;">&#91;</span>-<span style="color: #ff4500;">2</span>:<span style="color: black;">&#93;</span> == extension:
                  files.<span style="color: black;">append</span><span style="color: black;">&#40;</span>name<span style="color: black;">&#41;</span>
         <span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">isdir</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'%s'</span> <span style="color: #66cc66;">%</span> name<span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">for</span> j <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">self</span>.<span style="color: black;">scan</span><span style="color: black;">&#40;</span>name<span style="color: black;">&#41;</span>:
               files.<span style="color: black;">append</span><span style="color: black;">&#40;</span>j<span style="color: black;">&#41;</span>
      <span style="color: #ff7700;font-weight:bold;">return</span> files
&nbsp;
   <span style="color: #483d8b;">&quot;&quot;&quot;
   extract @commit comment from filename
   &quot;&quot;&quot;</span>
&nbsp;
   <span style="color: #ff7700;font-weight:bold;">def</span> extract <span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, filename<span style="color: black;">&#41;</span>:
      contents = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span>filename<span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
      <span style="color: #808080; font-style: italic;"># regex @commit till and excluding n (raw for r)</span>
      match = <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;@commit(.*)&quot;</span>, contents<span style="color: black;">&#41;</span>
      <span style="color: #ff7700;font-weight:bold;">if</span> match:
         <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#123;</span> <span style="color: #483d8b;">'comment'</span> : match.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, <span style="color: #483d8b;">'filename'</span> : filename, <span style="color: #483d8b;">'hash'</span> : <span style="color: #dc143c;">md5</span><span style="color: black;">&#40;</span>contents<span style="color: black;">&#41;</span>.<span style="color: black;">hexdigest</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: black;">&#125;</span>
&nbsp;
   <span style="color: #483d8b;">&quot;&quot;&quot;
   checks for legit changes within self.list
   removes any non-legit files
   &quot;&quot;&quot;</span>
&nbsp;
   <span style="color: #ff7700;font-weight:bold;">def</span> check <span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, current<span style="color: black;">&#41;</span>:
&nbsp;
      <span style="color: #008000;">self</span>.<span style="color: black;">cursor</span>.<span style="color: black;">execute</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'SELECT hash, comment FROM svnc WHERE filename = &quot;%s&quot;'</span> <span style="color: #66cc66;">%</span> current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
      client = pysvn.<span style="color: black;">Client</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
      row = <span style="color: #008000;">self</span>.<span style="color: black;">cursor</span>.<span style="color: black;">fetchone</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
      <span style="color: #808080; font-style: italic;"># add file to database</span>
      <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">self</span>.<span style="color: black;">cursor</span>.<span style="color: black;">rowcount</span> == <span style="color: #ff4500;">0</span> <span style="color: #ff7700;font-weight:bold;">or</span> row == <span style="color: #008000;">None</span>:
         <span style="color: #ff7700;font-weight:bold;">print</span> current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">&quot;not currently in database, adding.&quot;</span>
         <span style="color: #008000;">self</span>.<span style="color: black;">cursor</span>.<span style="color: black;">execute</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'INSERT INTO svnc (filename, hash, comment) VALUES (&quot;%s&quot;, &quot;%s&quot;, &quot;%s&quot;)'</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span>, current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'hash'</span><span style="color: black;">&#93;</span>, current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'comment'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
         <span style="color: #808080; font-style: italic;"># TODO before adding to svn repository, check if it already belongs to one</span>
         <span style="color: #808080; font-style: italic;">#entry = client.info(current['filename'].rsplit(&quot;/&quot;, 1)[0])</span>
         <span style="color: #ff7700;font-weight:bold;">if</span> client.<span style="color: black;">add</span><span style="color: black;">&#40;</span>current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> == pysvn._pysvn_2_5.<span style="color: black;">ClientError</span>:
            <span style="color: #ff7700;font-weight:bold;">print</span> current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">&quot;does not belong to a SVN checkout.&quot;</span>
            <span style="color: #ff7700;font-weight:bold;">return</span>
         <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
      <span style="color: #808080; font-style: italic;"># return if there has been no comment changes</span>
      <span style="color: #ff7700;font-weight:bold;">if</span> row<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span> == current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'comment'</span><span style="color: black;">&#93;</span>:
         <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
      <span style="color: #808080; font-style: italic;"># replace new comment with old</span>
      <span style="color: #808080; font-style: italic;"># check md5 checksum</span>
      replacedChecksum = <span style="color: #dc143c;">md5</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'@commit %s'</span> <span style="color: #66cc66;">%</span> current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'comment'</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">'@commit %s'</span> <span style="color: #66cc66;">%</span> row<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>, <span style="color: #008000;">open</span><span style="color: black;">&#40;</span>current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">'r'</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.<span style="color: black;">hexdigest</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
      currentChecksum = <span style="color: #dc143c;">md5</span><span style="color: black;">&#40;</span><span style="color: #008000;">open</span><span style="color: black;">&#40;</span>current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">'r'</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.<span style="color: black;">hexdigest</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
      <span style="color: #ff7700;font-weight:bold;">if</span> replacedChecksum <span style="color: #66cc66;">!</span>= currentChecksum:
         <span style="color: #ff7700;font-weight:bold;">print</span> current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">&quot;has changed, commiting changes to SVN repository.&quot;</span>
         <span style="color: #008000;">self</span>.<span style="color: black;">cursor</span>.<span style="color: black;">execute</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'UPDATE svnc SET comment = &quot;%s&quot;, hash = &quot;%s&quot; WHERE filename = &quot;%s&quot;'</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'comment'</span><span style="color: black;">&#93;</span>, replacedChecksum, current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
         client.<span style="color: black;">checkin</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'filename'</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span>, current<span style="color: black;">&#91;</span><span style="color: #483d8b;">'comment'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Let's run it!</span>
sc = svnc
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> sc<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">scan</span><span style="color: black;">&#40;</span>sc<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;checkout&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
   <span style="color: #ff7700;font-weight:bold;">if</span> sc<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">extract</span><span style="color: black;">&#40;</span>i<span style="color: black;">&#41;</span> <span style="color: #66cc66;">!</span>= <span style="color: #008000;">None</span>:
      sc<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">check</span><span style="color: black;">&#40;</span>sc<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">extract</span><span style="color: black;">&#40;</span>i<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/svn-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gedit Plugins</title>
		<link>http://rezolabs.com/web-development/gedit-plugins/</link>
		<comments>http://rezolabs.com/web-development/gedit-plugins/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 08:04:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[gedit]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=12</guid>
		<description><![CDATA[Software Freedom Day was held on Saturday 20th September. It was a chance to raise more awareness of GNU/Linux and free software. I got involved with the day, and setup an awareness stand with my friend Jake. We burnt off about 25 copies of Ubuntu, 10 copies of Open Disc (containing OpenOffice, Firefox and more free software), and about 5 copies of Open Education disc, which contained free educational software for students.

The day went from 10am till 4pm. Software Freedom Day for our team consided of a few lengthy discussions based on GNU/Linux, showing off the Compiz-Fusion project, demonstrating a few features of OpenOffice, and of course, teaching some newcomers what GNU/Linux is about.]]></description>
			<content:encoded><![CDATA[<p>The text editor gedit is part of the GNOME desktop environment, which I happen to use currently. One really nice feature about this GUI text editor, is the fact it supports Python and C plugins.</p>
<p>So, I thought I&#8217;d take my time to share some useful plugins which I&#8217;ve been using. Also, below the list, you can find out how to install a plugin.</p>
<p>Embeded Terminal</p>
<p>This is a nice plugin, it gives you a small terminal within gedit. Of cause you could just tab into your terminal, within another window. But it&#8217;s nice to have one built in.</p>
<p>External Tools</p>
<p>Very useful plugin, allows you to create a shortcut to an external tool. For instance, if you want to run make, or execute the current source code file, you can do so using the external tools plugin. Simple to setup, and has a few pre-made examples which you can use.</p>
<p><a href="http://live.gnome.org/Gedit/Plugins?action=AttachFile&amp;do=view&amp;target=fullscreen-2006-07-13.tar.bz2">Fullscreen</a></p>
<p>Have you ever wanted gedit to be fullscreen, or generally code in fullscreen mode. This plugin will be handy for you. You still have all the features of the text editor, but it&#8217;s fullscreen and without the window decoration.</p>
<p>Indent Lines</p>
<p>A standard plugin, which comes with gedit itself.</p>
<p><a href="http://vaem.googlecode.com/files/gedit2_regex_replace_plugin.tar.gz">Regex Search and Replace</a></p>
<p>Very useful, and is an essential for every text editor. Use regular expressions for searching and substitution of text.</p>
<p>Snippets</p>
<p>Another standard plugin, yet one I can&#8217;t live without. Makes life so much easier. Snippets allows you to make little auto-complete code snippets. Where, say you type &#8220;inc&#8221;, it could translate to &#8220;#include &lt;$0&gt;&#8221; when tab-completed.</p>
<p>Installing a Plugin</p>
<p>Once you have downloaded the plugin you want, extract it. For instance:</p>
<p>tar zxvf plugin-name.tar.gz</p>
<p>Then, `cp` the extracted contents to ~/.gnome2/gedit/plugins/. For me, this directory location didn&#8217;t exist, so create it if it doesn&#8217;t exist.</p>
<p>Reload gedit, go to Edit -&gt; Preferences, and enable your plugins within the plugin tab.</p>
<p>Extra Plugins</p>
<p>Also, you can get extra official gedit plugins from the Debian / Ubuntu repository.</p>
<p>apt-get install gedit-plugins</p>
<p>Note</p>
<p>External links are only for those plugins which were created by 3rd party.</p>
<p>Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/web-development/gedit-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Freedom Day</title>
		<link>http://rezolabs.com/gnu-linux/software-freedom-day/</link>
		<comments>http://rezolabs.com/gnu-linux/software-freedom-day/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 08:01:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Activism]]></category>
		<category><![CDATA[free software foundation]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[software freedom day]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=10</guid>
		<description><![CDATA[Software Freedom Day was held on Saturday 20th September. It was a chance to raise more awareness of GNU/Linux and free software. I got involved with the day, and setup an awareness stand with my friend Jake. We burnt off about 25 copies of Ubuntu, 10 copies of Open Disc (containing OpenOffice, Firefox and more free software), and about 5 copies of Open Education disc, which contained free educational software for students.

The day went from 10am till 4pm. Software Freedom Day for our team consided of a few lengthy discussions based on GNU/Linux, showing off the Compiz-Fusion project, demonstrating a few features of OpenOffice, and of course, teaching some newcomers what GNU/Linux is about.]]></description>
			<content:encoded><![CDATA[<p>Software Freedom Day was held on Saturday 20th September. It was a chance to raise more awareness of GNU/Linux and free software. I got involved with the day, and setup an awareness stand with my friend Jake. We burnt off about 25 copies of Ubuntu, 10 copies of Open Disc (containing OpenOffice, Firefox and more free software), and about 5 copies of Open Education disc, which contained free educational software for students.</p>
<p>The day went from 10am till 4pm. Software Freedom Day for our team consided of a few lengthy discussions based on GNU/Linux, showing off the Compiz-Fusion project, demonstrating a few features of OpenOffice, and of course, teaching some newcomers what GNU/Linux is about.</p>
<p>For those of you who are still Windows users, and don&#8217;t know whats so great about the whole GNU/Linux deal. GNU/Linux respects your freedom a lot more than Windows. By saying this, it&#8217;s free (does not cost), is open source (edit the source code to your will), you can use any tool for any purpose. Unlike Windows applications, where you are restricted to what the program can, and can&#8217;t do. You can&#8217;t extend, or modify an official Windows application.</p>
<p>For those who want to read more about what GNU/Linux is, what freedom of GNU/Linux is, you should check out Richard Stallman&#8217;s book, &#8220;Free Software, Free Society, Selected Essays of Richard M. Stallman&#8221;. It is very worthwhile reading, in fact I have my own signed copy of it.</p>
<p>You can check out a small video clip from the day below.</p>
<p><object width="425" height="344" data="http://www.youtube.com/v/ulzhd5dC4RQ&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/ulzhd5dC4RQ&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/software-freedom-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X11 Large &amp;&amp; Small Font Size Issue</title>
		<link>http://rezolabs.com/gnu-linux/x11-large-small-font-size-issue/</link>
		<comments>http://rezolabs.com/gnu-linux/x11-large-small-font-size-issue/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 07:59:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[bug fix]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[font size issue]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[x11]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=8</guid>
		<description><![CDATA[There was an issue with physical screen size detection some time ago, in a version of X. This caused extremely small, or large fonts to be displayed instead of normal sized fonts.

The problem is effected within the development versions of X within Debian lenny/sid, perhaps on other distributions as well.

However, there is a work around using the xrandr command (which is used to set size, orientation and/or reflection of the outputs for a screen*).]]></description>
			<content:encoded><![CDATA[<p>There was an issue with physical screen size detection some time ago, in a version of X. This caused extremely small, or large fonts to be displayed instead of normal sized fonts.</p>
<p>The problem is effected within the development versions of X within Debian lenny/sid, perhaps on other distributions as well.</p>
<p>However, there is a work around using the xrandr command (which is used to set size, orientation and/or reflection of the outputs for a screen*). The work around is as follows.</p>
<p>Append to /etc/X11/Xsession,</p>
<p>/usr/bin/xrandr &#8211;fbmm XxY</p>
<p>Were X and Y are your real physical screen sizes (get a ruler!) in mm.</p>
<p>My laptop runs on, 330&#215;270, so I therefore have:</p>
<p>/usr/bin/xrandr &#8211;fbmm 330&#215;270</p>
<p>As my last entry within this file.</p>
<p>Note, this seems to have been fixed in recent versions of X, so this doesn&#8217;t exactly apply to up-to-date systems any more.</p>
<p>I am also not sure whether the small font issue is the same as the large font issue, but it makes sense that it would be. This work around should work for small font issue as well.</p>
<p>* Taken from `man xrandr`</p>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/x11-large-small-font-size-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Richard Stallmans Lecture</title>
		<link>http://rezolabs.com/gnu-linux/richard-stallmans-lecture/</link>
		<comments>http://rezolabs.com/gnu-linux/richard-stallmans-lecture/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 07:52:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[auckland]]></category>
		<category><![CDATA[lecture]]></category>
		<category><![CDATA[New Zealand]]></category>
		<category><![CDATA[Richard Stallman]]></category>
		<category><![CDATA[stickers]]></category>
		<category><![CDATA[tour]]></category>
		<category><![CDATA[toy]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=6</guid>
		<description><![CDATA[Last Friday I had the privilege of seeing Richard Stallman give a lecture on "Copyright and Community in the Age of the Computer Networks". It was a rather interesting lecture, where he raised some informative points, which I agree with.]]></description>
			<content:encoded><![CDATA[<p>Last Friday I had the privilege of seeing Richard Stallman give a lecture on &#8220;Copyright and Community in the Age of the Computer Networks&#8221;. It was a rather interesting lecture, where he raised some informative points, which I agree with.</p>
<p>One of the examples of copyright within the age of computer networks was copyright with books. Yes, his lecture wasn&#8217;t entirely computer related, it was more media related, movies, music, books and of course, software. The examples he presented were based on books in general, the fact copyright for books goes on far too long. Plus the fact authors of books tend to extend their copyright when it&#8217;s about to expire.</p>
<p>An example he gave was, you don&#8217;t see a blacksmith copyright his work and getting his grand children and what not to benefit from the work he produced as a blacksmith, in the way of getting paid for their grandparents work. This is what seems to happen with copyright and media. Authors of books are getting 75 year copyright licenses for their books, in which their grandchildren and such are benefiting from the sales of the books, ie. getting cash they did not earn.</p>
<p>Another interesting case is the DRM (Digital Rights Management) issue. DRM has been implemented upon a few technologies today, such as iPod, iTunes, Windows Media Player (optional) and more. What DRM does, is it restricts the user&#8217;s ability to port media from one source, or device to another. Using non-DRM protected media, you are able to view the same media on any device. However, when using DRM protected media, you are only able to view the media on DRM supported devices. Companies such as Microsoft, Apple and possibly others are claiming it&#8217;s better for the end user, that they have more freedom in playing music on their DRM devices. It&#8217;s not though, it&#8217;s restricting the end user to only be able to play their media on DRM devices, which is ridiculous. As Stallman said, people should be allowed to play media on the device of their choice, DRM protected or not. Whither it&#8217;s a computer, mp3 player, or a gaming console. If the device supports the media, or you can make a hack for it to support it, you should be able to.</p>
<p>The lecture went on for an hour and a half, which went surprisingly fast. At the end of the lecture, there were stickers (free), GNU teddy bears and badges available for us to buy. I ended up buying a GNU teddy bear ($30 donation to FSF), and a badge ($3 donation). I also got about at least 20 stickers. The stickers were anti-(DRM, iPod, iTunes), Bad Vista, GNU, Free Software Foundation (FSF) stickers and more.</p>
<p>Here&#8217;s some small picture&#8217;s of a GNU, and FSF sticker&#8217;s I got, which I placed on the cover of my laptop. I&#8217;ll upload my GNU teddy bear picture once I take a photo of it, currently not sure were my digital camera is.</p>
<p><img src="http://bp2.blogger.com/_jn1P702_0FE/Rk8yPUaUDqI/AAAAAAAAAA0/eFS1WL45Ys0/s320/DSC00272.JPG" alt="GNU/Linux Stickers" /></p>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/richard-stallmans-lecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Game Reviews on YouTube</title>
		<link>http://rezolabs.com/gnu-linux/linux-game-reviews-on-youtube/</link>
		<comments>http://rezolabs.com/gnu-linux/linux-game-reviews-on-youtube/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 07:50:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[game reviews]]></category>
		<category><![CDATA[initialize]]></category>
		<category><![CDATA[linux game reviews]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://rezolabs.com/?p=4</guid>
		<description><![CDATA[About a month ago, I came up with a idea to produce Linux game reviews. The game reviews being for any genre, the game must be free, but not necessarily open source. There is now a website up for the reviews, at http://linuxgamereviews.org/. Be sure to check it out, or add it to your RSS [...]]]></description>
			<content:encoded><![CDATA[<p>About a month ago, I came up with a idea to produce Linux game reviews. The game reviews being for any genre, the game must be free, but not necessarily open source.</p>
<p>There is now a website up for the reviews, at <a title="http://linuxgamereviews.org/" href="http://linuxgamereviews.org/">http://linuxgamereviews.org/</a>. Be sure to check it out, or add it to your RSS list for new reviews and more.</p>
]]></content:encoded>
			<wfw:commentRss>http://rezolabs.com/gnu-linux/linux-game-reviews-on-youtube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
