<?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>GL.IB.LY &#187; one liners</title>
	<atom:link href="http://gl.ib.ly/tag/one-liners/feed/" rel="self" type="application/rss+xml" />
	<link>http://gl.ib.ly</link>
	<description>Thoughts on security, computing, business and stuff!</description>
	<lastBuildDate>Sun, 18 May 2014 11:51:56 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Fixing binary merge conflicts in git</title>
		<link>http://gl.ib.ly/stuff/2009/09/03/fixing-binary-merge-conflicts-git/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fixing-binary-merge-conflicts-git</link>
		<comments>http://gl.ib.ly/stuff/2009/09/03/fixing-binary-merge-conflicts-git/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 06:59:37 +0000</pubDate>
		<dc:creator><![CDATA[tariq]]></dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[mergetool]]></category>
		<category><![CDATA[one liners]]></category>
		<category><![CDATA[opendiff]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[tidbits]]></category>

		<guid isPermaLink="false">http://gl.ib.ly/?p=86</guid>
		<description><![CDATA[<p>Git is an awesome tool for managing your code. However, it does take a while to get used to doing things in git. One question I get asked a bit too often is &#8220;how do I resolve binary merge conflicts&#8221;?<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://gl.ib.ly/stuff/2009/09/03/fixing-binary-merge-conflicts-git/">Read more &#8250;</a></div><!-- end of .read-more --></p><p>The post <a href="http://gl.ib.ly/stuff/2009/09/03/fixing-binary-merge-conflicts-git/">Fixing binary merge conflicts in git</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><span style="color: #545454;">Git is an awesome tool for managing your code. However, it does take a while to get used to doing things in git. One question I get asked a bit too often is &#8220;how do I resolve binary merge conflicts&#8221;? Thankfully this is is pretty easy. I usually run the </span><code style="color: #545454;">git mergetool</code><span style="color: #545454;"> command to allow me to resolve merge conflicts using a graphical interface and then manipulate the resultant files on the command line. </span><br style="color: #545454;" /><br style="color: #545454;" /></p>
<blockquote style="color: #76767a;"><p>You can specify which editor to use in your <code>~/.gitconfig</code> file. Favourites are <i>kdiff3</i>, <i>vimdiff</i>, <i>xxdiff</i>, and <i>opendiff</i>. If your on Mac OSX then you may be used to FileMerge, in which case you should be using <i>opendiff</i> in your <code>.gitconfig</code>; see below.</p>
<div><code>...<br />
[merge]<br />
tool = opendiff<br />
...<br />
</code></div>
</blockquote>
<p><br style="color: #545454;" /><br style="color: #545454;" /><span style="color: #545454;">So, when you are using mergetool option you will something like:</span></p>
<div style="color: #545454;"><code>Normal merge conflict for 'lib/yui/assets/skins/sam/editor-sprite.gif':<br />
{local}: created<br />
{remote}: created<br />
Hit return to start merge resolution tool (opendiff):<br />
</code></div>
<p><br style="color: #545454;" /><br style="color: #545454;" /><span style="color: #545454;">I just hit return so the editor opens, it will probably warn you the file is binary. In a separate terminal window navigate to the directory where the file is in and do an </span><code style="color: #545454;">ls</code><span style="color: #545454;">; you&#8217;ll see something like what is below:</span></p>
<div style="color: #545454;"><code>editor-sprite.gif<br />
editor-sprite.gif.BACKUP.41930.gif<br />
editor-sprite.gif.LOCAL.41930.gif<br />
editor-sprite.gif.REMOTE.41930.gif<br />
</code></div>
<p><br style="color: #545454;" /><br style="color: #545454;" /><span style="color: #545454;">In this case editor-sprite.gif.REMOTE.41930.gif is the new file and editor-sprite.gif is the original file. To resolve the conflict just copy the REMOTE file over the original file. In my case it would be </span><code style="color: #545454;">cp editor-sprite.gif.REMOTE.41930.gif editor-sprite.gif</code><span style="color: #545454;">. However, I use the following one liner to resolve these conflicts more generically.</span></p>
<div class="geshi" style="color: #545454;"><span style="font-weight: bold; color: #c20cb9;">ls</span> *.REMOTE.* | <span style="font-weight: bold; color: #c20cb9;">sed</span> <span style="color: #ff0000;">&#8220;s/\(\(.*\).REMOTE.*\)/cp \1 \2/g&#8221;</span> | <span style="font-weight: bold; color: #c20cb9;">sh</span></div>
<p><br style="color: #545454;" /><span style="color: #545454;">I have it in shell script in my path so I just run it when I need to resolve these types of conflicts. It just finds files with </span><i style="color: #545454;">REMOTE</i><span style="color: #545454;"> in them and then issues a </span><code style="color: #545454;">cp</code><span style="color: #545454;"> command to copy that file over the original.</span><br style="color: #545454;" /><br style="color: #545454;" /><span style="color: #545454;">Hope this helps!</span><br style="color: #545454;" /><br style="color: #545454;" /></p>
<blockquote style="color: #76767a;"><p>Outside of <i>git mergetool</i> you can just add the binary files using <i>git add file1 file2 &#8230;</i>.</p></blockquote>
<p>&nbsp;</p>
<p>The post <a href="http://gl.ib.ly/stuff/2009/09/03/fixing-binary-merge-conflicts-git/">Fixing binary merge conflicts in git</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gl.ib.ly/stuff/2009/09/03/fixing-binary-merge-conflicts-git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Encoding audio and removing file extensions from files</title>
		<link>http://gl.ib.ly/stuff/2009/07/24/encoding-audio-removing-file-extensions-files/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=encoding-audio-removing-file-extensions-files</link>
		<comments>http://gl.ib.ly/stuff/2009/07/24/encoding-audio-removing-file-extensions-files/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 06:41:28 +0000</pubDate>
		<dc:creator><![CDATA[tariq]]></dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[moving]]></category>
		<category><![CDATA[one liners]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[renaming]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[sh]]></category>

		<guid isPermaLink="false">http://gl.ib.ly/?p=43</guid>
		<description><![CDATA[<p>Earlier today I got a massive SCORM object that contained lots of mp3 files. They were all high quality files, so I wanted to cut them down in size for web use. For this purpose I am using ffmpeg which you can<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://gl.ib.ly/stuff/2009/07/24/encoding-audio-removing-file-extensions-files/">Read more &#8250;</a></div><!-- end of .read-more --></p><p>The post <a href="http://gl.ib.ly/stuff/2009/07/24/encoding-audio-removing-file-extensions-files/">Encoding audio and removing file extensions from files</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Earlier today I got a massive SCORM object that contained lots of mp3 files. They were all high quality files, so I wanted to cut them down in size for web use. For this purpose I am using <a title="http://ffmpeg.org/" href="http://web.archive.org/web/20100516171703/http://gl.ib.ly/exit.php?url_id=80&amp;entry_id=34">ffmpeg</a> which you can easily get for Windows, Linux or Mac. I tried the following on a Mac, but it should also work on Linux (paths permitting) and on Windows if you are using something like <a title="http://www.cygwin.com/" href="http://web.archive.org/web/20100516171703/http://gl.ib.ly/exit.php?url_id=81&amp;entry_id=34">cygwin</a>.</p>
<p>I <em>highly</em> recommend you get familiar with ffmpeg as it is amazingly useful. Just check out the <a title="http://linux.die.net/man/1/ffmpeg" href="http://web.archive.org/web/20100516171703/http://gl.ib.ly/exit.php?url_id=82&amp;entry_id=34">man pages</a>; swf to avi, avi to something that works on ipods, all a breeze!</p>
<div>So lets start and end with entering the directory which contains all our audio files on the command line. Once inside this directory we can use:</p>
<div>
<pre>find . -type f -name *.mp3 -exec ffmpeg -i {} -ac 1 -ab 32k {}32kb_m.mp3 \;</pre>
</div>
<p>Now, as you can see, I have created a new file for each original file. Each new file&#8217;s name is appended with 32kb_m.mp3 which tells me information about how the new mp3 file is encoded and gives hints to ffmpeg as to the files format (mp3 and encoder). Let me explain a little about the command. With <code>find</code> we are saying <i>find stuff in the current directory which are files and end in &#8220;.mp3&#8243; and when you find them execute ffmpeg.</i> The {} bit is expanded with whatever file <code>find</code>found. With the <code>ffmpeg</code> bit we are saying <i>our lord of ffmpeg please take as input this file from<code>find</code>&#8216;s output and set the number of audio channels to 1 and the bitrate to 32kbp/s and then output the file using the settings to a file whose filename is the same as our input file but has 32kb_m.mp3 added to end</i>.</p>
<p>Now we have created our new files and checked everything is ok (you should have those audios backed up somewhere too) we want to move all these new files to the locations of the originals. Our command moves/renames the files, removing part of the filename, recursively. Here it is:</p>
<pre>find . -type f -name *32kb_m.mp3 | sed 's/\(.*\)32kb_m.mp3/mv "\132kb_m.mp3" "\1"/' | sh</pre>
<p>So, again we use find! Here we are saying <i>find, in the current directory, all files with file names ending in &#8220;32kb_m.mp3&#8243; </i>. Here we are only, hopefully, pulling out our newly created files. Next we pipe all this data to <code>sed</code>. We tell <code>sed</code>: <i>hey Mr. Sed, look for any set of characters that are followed with &#8220;32kb_m.mp3&#8243; and replace the entire string (including 32kb_m.mp3) with &#8220;mv [the bit matched before 32kb_m.mp3]32kb_m.mp3 [the bit matched before 32kb_m.mp3]&#8220;</i>. Very simple, I hope! We are taking the big list from the output of find and using sed to transform the output into lots of <code>mv</code> commands. If we pipe these commands to <code>sh</code> then all those commands get executed. Hey presto, we&#8217;re done!</p>
<h2>How much space did you save?</h2>
<p>All my mp3s were in &#8216;audio&#8217; which I copied to &#8216;audio_32kb_m&#8217;. I then entered audio_32kb_m by cding into it and executing the commands above. Below is the output from <code>du</code> which tells me the total size of my audio directories. Size reduction is around 75%.</p>
<pre>snapple:/tmp tariq$ du -hs audio*
 33M	audio
8.5M	audio_32kb_m</pre>
</div>
<p>The post <a href="http://gl.ib.ly/stuff/2009/07/24/encoding-audio-removing-file-extensions-files/">Encoding audio and removing file extensions from files</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gl.ib.ly/stuff/2009/07/24/encoding-audio-removing-file-extensions-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All configuration variables in Moodle code &#8211; Part two</title>
		<link>http://gl.ib.ly/computing/2009/06/24/configuration-variables-moodle-code-part-two/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=configuration-variables-moodle-code-part-two</link>
		<comments>http://gl.ib.ly/computing/2009/06/24/configuration-variables-moodle-code-part-two/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 17:53:03 +0000</pubDate>
		<dc:creator><![CDATA[tariq]]></dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Stuff]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[cfg]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[configuration variables]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[one liners]]></category>

		<guid isPermaLink="false">http://gl.ib.ly/?p=73</guid>
		<description><![CDATA[<p>Earlier we looked at how you can extract a list of all the $CFG variables in your Moodle code. Now that&#8217;s not of much use! We need to know where in the code all these variables hide. I feel some spooky awk a<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://gl.ib.ly/computing/2009/06/24/configuration-variables-moodle-code-part-two/">Read more &#8250;</a></div><!-- end of .read-more --></p><p>The post <a href="http://gl.ib.ly/computing/2009/06/24/configuration-variables-moodle-code-part-two/">All configuration variables in Moodle code &#8211; Part two</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a style="color: #7da939;" title="http://gl.ib.ly/archives/8-All-configuration-variables-in-Moodle-code.html" href="http://gl.ib.ly/archives/8-All-configuration-variables-in-Moodle-code.html">Earlier</a><span style="color: #545454;"> we looked at how you can extract a list of all the </span><code style="color: #545454;">$CFG</code><span style="color: #545454;"> variables in your Moodle code. Now that&#8217;s not of much use! We need to know where in the code all these variables hide. I feel some spooky awk a coming on.</span></p>
<div class="serendipity_entry_extended" style="color: #545454;"><i>Please note this doesn&#8217;t show all the variables available in Moodle, it shows all the Moodle variables in a particular codebase. Below output is shown from one of my own codebases which is a little different to what you might expect to see in MOODLE_19_STABLE</i>In <a style="color: #7da939;" title="http://gl.ib.ly/archives/8-All-configuration-variables-in-Moodle-code.html" href="http://gl.ib.ly/archives/8-All-configuration-variables-in-Moodle-code.html">All configuration variables in Moodle code</a> we came up with:</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -r &#8211;no-filename -o &#8216;\$CFG-&gt;<span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span><span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span>*&#8217; &lt;path_to_moodle&gt; | <span style="font-weight: bold; color: #c20cb9;">sort</span> -u</div>
<p>This gives us some useful information but hides a lot of the detail. Let&#8217;s try and include which files the variable appears in even the line numbers. For this we&#8217;ll go back to:</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -r -no &#8216;\$CFG-&gt;<span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span><span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span>*&#8217;</div>
<p>This will print line numbers for matches. Hmmm, what happens if two or more matches are found on one line? Well the second var will be printed without the file and line number &#8212; silly badness, see below!</p>
<pre>./admin/auth.php:11:$CFG-&gt;libdir
./admin/auth.php:12:$CFG-&gt;libdir
./admin/auth.php:17:$CFG-&gt;wwwroot
<span style="color: #ff0000;">$CFG-&gt;admin</span>
./admin/auth.php:26:$CFG-&gt;auth
./admin/auth.php:29:$CFG-&gt;auth
./admin/auth.php:52:$CFG-&gt;registerauth
./admin/auth_config.php:7:$CFG-&gt;libdir
./admin/auth_config.php:11:$CFG-&gt;pagepath
</pre>
<p>To add some context to <span style="color: #ff0000;">$CFG-&gt;admin</span> (which appears on line 17 of admin/auth.php) we introduce <code>awk</code> to the fray.</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -r -no &#8216;\$CFG-&gt;<span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span><span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span>*&#8217; . | <span style="font-weight: bold; color: #c20cb9;">awk</span> -F: &#8216;BEGIN<span style="font-weight: bold; color: #7a0874;">{</span> s=<span style="color: #ff0000;">&#8220;&#8221;</span> <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #7a0874;">{</span> <span style="font-weight: bold; color: #000000;">if</span><span style="font-weight: bold; color: #7a0874;">(</span>$<span style="color: #000000;">3</span><span style="font-weight: bold; color: #7a0874;">)</span> <span style="font-weight: bold; color: #7a0874;">{</span> print $<span style="color: #000000;">0</span>; s=$1<span style="color: #ff0000;">&#8220;:&#8221;</span>$2<span style="color: #ff0000;">&#8220;:&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #000000;">else</span>  print s$<span style="color: #000000;">0</span>; <span style="font-weight: bold; color: #7a0874;">}</span>&#8216;</div>
<p>Here, <code>awk</code> saves the previous line&#8217;s first and second fields (separated by &#8216;:&#8217;) if the third field is not empty. If the third field is empty it prepends the first and second fields of the previous line to whatever is on the current line. Nifty, eh? So when we run our command line we now get:</p>
<pre>./admin/auth.php:11:$CFG-&gt;libdir
./admin/auth.php:12:$CFG-&gt;libdir
./admin/auth.php:17:$CFG-&gt;wwwroot
./admin/auth.php:17:$CFG-&gt;admin
./admin/auth.php:26:$CFG-&gt;auth
./admin/auth.php:29:$CFG-&gt;auth
./admin/auth.php:52:$CFG-&gt;registerauth
./admin/auth_config.php:7:$CFG-&gt;libdir
./admin/auth_config.php:11:$CFG-&gt;pagepath</pre>
<p>Much better! Now that we are getting all the data we can do something useful. Let&#8217;s sort everything for convenience.</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -r -no &#8216;\$CFG-&gt;<span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span><span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span>*&#8217; . | <span style="font-weight: bold; color: #c20cb9;">awk</span> -F: &#8216;BEGIN<span style="font-weight: bold; color: #7a0874;">{</span> s=<span style="color: #ff0000;">&#8220;&#8221;</span> <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #7a0874;">{</span> <span style="font-weight: bold; color: #000000;">if</span><span style="font-weight: bold; color: #7a0874;">(</span>$<span style="color: #000000;">3</span><span style="font-weight: bold; color: #7a0874;">)</span> <span style="font-weight: bold; color: #7a0874;">{</span> print $<span style="color: #000000;">0</span>; s=$1<span style="color: #ff0000;">&#8220;:&#8221;</span>$2<span style="color: #ff0000;">&#8220;:&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #000000;">else</span>  print s$<span style="color: #000000;">0</span>; <span style="font-weight: bold; color: #7a0874;">}</span>&#8216; | <span style="font-weight: bold; color: #c20cb9;">sort</span> -t: -k3</div>
<p>We are sorting our data by the third field in each row. So we tell sort to use &#8216;:&#8217; as our field delimiter with the <code>-t</code> and we tell <code>sort</code> to use the third field with <code>-k3</code>.</p>
<p>Now we&#8217;ll make everything prettier by using <code>awk</code> again (our data should be small enough). We use <code>awk</code> to keep track of the last file and variable <code>awk</code> sees and then make formatting improvements as these values change; e.g. if the Variable changes from $CFG-&gt;admin to $CFG-&gt;wwwroot then prepend variable name with <code>\n\n</code> which inserts two line returns. This all looks pretty scary&#8230;</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -r -no &#8216;\$CFG-&gt;<span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span><span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span>*&#8217; . | <span style="font-weight: bold; color: #c20cb9;">awk</span> -F: &#8216;BEGIN<span style="font-weight: bold; color: #7a0874;">{</span> s=<span style="color: #ff0000;">&#8220;&#8221;</span> <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #7a0874;">{</span> <span style="font-weight: bold; color: #000000;">if</span><span style="font-weight: bold; color: #7a0874;">(</span>$<span style="color: #000000;">3</span><span style="font-weight: bold; color: #7a0874;">)</span> <span style="font-weight: bold; color: #7a0874;">{</span> print $<span style="color: #000000;">0</span>; s=$1<span style="color: #ff0000;">&#8220;:&#8221;</span>$2<span style="color: #ff0000;">&#8220;:&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #000000;">else</span>  print s$<span style="color: #000000;">0</span>; <span style="font-weight: bold; color: #7a0874;">}</span>&#8216; | <span style="font-weight: bold; color: #c20cb9;">sort</span> -t: -k3 | <span style="font-weight: bold; color: #c20cb9;">awk</span> -F: &#8216;BEGIN<span style="font-weight: bold; color: #7a0874;">{</span> v=<span style="color: #ff0000;">&#8220;&#8221;</span>; f=<span style="color: #ff0000;">&#8220;&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #7a0874;">{</span> <span style="font-weight: bold; color: #000000;">if</span><span style="font-weight: bold; color: #7a0874;">(</span>v!=$<span style="color: #000000;">3</span><span style="font-weight: bold; color: #7a0874;">)</span> <span style="font-weight: bold; color: #7a0874;">{</span> v = $<span style="color: #000000;">3</span>; f=<span style="color: #ff0000;">&#8220;&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">printf</span> <span style="color: #ff0000;">&#8220;\n\n&#8221;</span>$<span style="color: #000000;">3</span>; <span style="font-weight: bold; color: #7a0874;">}</span> <span style="font-weight: bold; color: #000000;">if</span><span style="font-weight: bold; color: #7a0874;">(</span>f!=$<span style="color: #000000;">1</span><span style="font-weight: bold; color: #7a0874;">)</span> <span style="font-weight: bold; color: #7a0874;">{</span> f = $<span style="color: #000000;">1</span>; <span style="font-weight: bold; color: #7a0874;">printf</span> <span style="color: #ff0000;">&#8220;\n\t&#8221;</span>$<span style="color: #000000;">1</span>; <span style="font-weight: bold; color: #7a0874;">}</span> <span style="font-weight: bold; color: #7a0874;">printf</span> <span style="color: #ff0000;">&#8220;:&#8221;</span>$<span style="color: #000000;">2</span> <span style="font-weight: bold; color: #7a0874;">}</span>&#8216;</div>
<p>This gives us something nice and pretty for our terminal window.</p>
<pre>...
$CFG-&gt;apachemaxmem
        ./lib/moodlelib.php:7544:7545:7547:7548
$CFG-&gt;aspellextradicts
        ./lib/speller/server-scripts/spellchecker.php:27:28
$CFG-&gt;aspellpath
        ./admin/settings/appearance.php:57
        ./lib/adminlib.php:2870:2881
        ./lib/editor/htmlarea/htmlarea.php:174:174:279:279
        ./lib/javascript.php:8
        ./lib/speller/changes.txt:19:1:29
        ./lib/speller/server-scripts/spellchecker.php:14:5
        ./lib/weblib.php:4988
...
</pre>
<p>We can, however, spruce things up a bit for the web:</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -r -no &#8216;\$CFG-&gt;<span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span><span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span>*&#8217; . | <span style="font-weight: bold; color: #c20cb9;">awk</span> -F: &#8216;BEGIN<span style="font-weight: bold; color: #7a0874;">{</span> s=<span style="color: #ff0000;">&#8220;&#8221;</span> <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #7a0874;">{</span> <span style="font-weight: bold; color: #000000;">if</span><span style="font-weight: bold; color: #7a0874;">(</span>$<span style="color: #000000;">3</span><span style="font-weight: bold; color: #7a0874;">)</span> <span style="font-weight: bold; color: #7a0874;">{</span> print $<span style="color: #000000;">0</span>; s=$1<span style="color: #ff0000;">&#8220;:&#8221;</span>$2<span style="color: #ff0000;">&#8220;:&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #000000;">else</span>  print s$<span style="color: #000000;">0</span>; <span style="font-weight: bold; color: #7a0874;">}</span>&#8216; | <span style="font-weight: bold; color: #c20cb9;">sort</span> -t: -k3 | <span style="font-weight: bold; color: #c20cb9;">awk</span> -F: &#8216;BEGIN<span style="font-weight: bold; color: #7a0874;">{</span> v=<span style="color: #ff0000;">&#8220;&#8221;</span>; f=<span style="color: #ff0000;">&#8220;&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">}</span><span style="font-weight: bold; color: #7a0874;">{</span> <span style="font-weight: bold; color: #000000;">if</span><span style="font-weight: bold; color: #7a0874;">(</span>v!=$<span style="color: #000000;">3</span><span style="font-weight: bold; color: #7a0874;">)</span> <span style="font-weight: bold; color: #7a0874;">{</span> v = $<span style="color: #000000;">3</span>; f=<span style="color: #ff0000;">&#8220;&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">printf</span> <span style="color: #ff0000;">&#8220;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&#8221;</span>$3<span style="color: #ff0000;">&#8220;&lt;/h1&gt;&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">}</span>  <span style="font-weight: bold; color: #000000;">if</span><span style="font-weight: bold; color: #7a0874;">(</span>f!=$<span style="color: #000000;">1</span><span style="font-weight: bold; color: #7a0874;">)</span> <span style="font-weight: bold; color: #7a0874;">{</span> f = $<span style="color: #000000;">1</span>; <span style="font-weight: bold; color: #7a0874;">printf</span> <span style="color: #ff0000;">&#8220;&lt;br&gt;&lt;span style=\&#8221;</span>font-weight: bold\<span style="color: #ff0000;">&#8220;&gt;&#8221;</span>$1<span style="color: #ff0000;">&#8220;&lt;/span&gt;&#8221;</span>; <span style="font-weight: bold; color: #7a0874;">}</span> <span style="font-weight: bold; color: #7a0874;">printf</span> <span style="color: #ff0000;">&#8220;:&#8221;</span>$<span style="color: #000000;">2</span> <span style="font-weight: bold; color: #7a0874;">}</span>&#8216;</div>
<p>This gives us something like the following output:</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ADMIN</h3>
<p><span style="font-weight: bold;">./admin/auth.php</span>:17<br />
<span style="font-weight: bold;">./admin/auth_config.php</span>:18<br />
<span style="font-weight: bold;">./admin/block.php</span>:44<br />
<span style="font-weight: bold;">./admin/blocks.php</span>:157:172:237<br />
<span style="font-weight: bold;">./admin/collect/cron.php</span>:11<br />
<span style="font-weight: bold;">./admin/collect/index.php</span>:108:114:120:126:14:22:22:43:80:91<br />
<span style="font-weight: bold;">./admin/collect/lib.php</span>:31:709:75:76<br />
<span style="font-weight: bold;">./admin/collect/queue.php</span>:105:106:123:13<br />
<span style="font-weight: bold;">./admin/cron.php</span>:168:170<br />
<span style="font-weight: bold;">./admin/environment.php</span>:124<br />
<span style="font-weight: bold;">./admin/filter.php</span>:16<br />
<span style="font-weight: bold;">./admin/filters.php</span>:11<br />
<span style="font-weight: bold;">./admin/index.php</span>:422:427:432:437:441:445:448:451:456:459:460:463:464:465:468:471:471:523:602<br />
<span style="font-weight: bold;">./admin/lang.php</span>:102:122:127:130:131:132:142:493:754<br />
<span style="font-weight: bold;">./admin/langdoc.php</span>:101<br />
<span style="font-weight: bold;">./admin/mnet/access_control.php</span>:48:63:76:87<br />
<span style="font-weight: bold;">./admin/mnet/adminlib.php</span>:75<br />
<span style="font-weight: bold;">./admin/mnet/delete.html</span>:3:4<br />
<span style="font-weight: bold;">./admin/mnet/enr_courses.php</span>:40<br />
<span style="font-weight: bold;">./admin/mnet/enr_hosts.php</span>:40:52<br />
<span style="font-weight: bold;">./admin/module.php</span>:41<br />
<span style="font-weight: bold;">./admin/modules.php</span>:201<br />
<span style="font-weight: bold;">./admin/pagelib.php</span>:72<br />
<span style="font-weight: bold;">./admin/register.php</span>:37<br />
<span style="font-weight: bold;">./admin/report/assess/index.php</span>:12:13:193:50<br />
<span style="font-weight: bold;">./admin/report/certify/index.php</span>:11:159:270<br />
<span style="font-weight: bold;">./admin/report/courseoverview/index.php</span>:18:88<br />
<span style="font-weight: bold;">./admin/report/courseoverview/reportsgraph.php</span>:32<br />
<span style="font-weight: bold;">./admin/report/lastaccess/index.php</span>:12<br />
<span style="font-weight: bold;">./admin/report/lateforleveltwo/index.php</span>:14:86:90<br />
<span style="font-weight: bold;">./admin/report/numberofcourses/index.php</span>:12<br />
<span style="font-weight: bold;">./admin/report/stats/index.php</span>:31:47<br />
<span style="font-weight: bold;">./admin/roles/assign.php</span>:381<br />
<span style="font-weight: bold;">./admin/roles/managetabs.php</span>:10:12:14<br />
<span style="font-weight: bold;">./admin/roles/override.php</span>:160:187<br />
<span style="font-weight: bold;">./admin/roles/tabs.php</span>:182:190<br />
<span style="font-weight: bold;">./admin/settings.php</span>:19:42:6<br />
<span style="font-weight: bold;">./admin/settings/collect.php</span>:12:17:18:19<br />
<span style="font-weight: bold;">./admin/settings/courses.php</span>:12<br />
<span style="font-weight: bold;">./admin/settings/frontpage.php</span>:56<br />
<span style="font-weight: bold;">./admin/settings/language.php</span>:24:25<br />
<span style="font-weight: bold;">./admin/settings/location.php</span>:23<br />
<span style="font-weight: bold;">./admin/settings/misc.php</span>:19:23:24:25:26<br />
<span style="font-weight: bold;">./admin/settings/mnet.php</span>:13:16:19:22:9<br />
<span style="font-weight: bold;">./admin/settings/plugins.php</span>:141:33:41:64<br />
<span style="font-weight: bold;">./admin/settings/server.php</span>:161:218:219:247:248<br />
<span style="font-weight: bold;">./admin/settings/top.php</span>:16:19:36:46:55<br />
<span style="font-weight: bold;">./admin/settings/unsupported.php</span>:10:7:8:9<br />
<span style="font-weight: bold;">./admin/settings/users.php</span>:58:71:72:74:75:81:82<br />
<span style="font-weight: bold;">./admin/stickyblocks.php</span>:47:73<br />
<span style="font-weight: bold;">./admin/upgradesettings.php</span>:31<br />
<span style="font-weight: bold;">./admin/uploaduser.php</span>:65:66<br />
<span style="font-weight: bold;">./admin/user/user_bulk.php</span>:22:23:24:25:26:5:6<br />
<span style="font-weight: bold;">./admin/user/user_bulk_confirm.php</span>:14<br />
<span style="font-weight: bold;">./admin/user/user_bulk_delete.php</span>:14<br />
<span style="font-weight: bold;">./admin/user/user_bulk_display.php</span>:11<br />
<span style="font-weight: bold;">./admin/user/user_bulk_download.php</span>:14<br />
<span style="font-weight: bold;">./admin/user/user_bulk_message.php</span>:13<br />
<span style="font-weight: bold;">./admin/xmldb/actions/XMLDBAction.class.php</span>:161<br />
<span style="font-weight: bold;">./admin/xmldb/index.php</span>:106:78:88<br />
<span style="font-weight: bold;">./admin/xmldb/javascript.php</span>:42:43:49:50<br />
<span style="font-weight: bold;">./backup/backup.php</span>:104:76:91<br />
<span style="font-weight: bold;">./backup/backup_scheduled.php</span>:180<br />
<span style="font-weight: bold;">./backup/log.php</span>:11<br />
<span style="font-weight: bold;">./backup/restore.php</span>:103:96<br />
<span style="font-weight: bold;">./backup/restore_check.html</span>:268<br />
<span style="font-weight: bold;">./blocks/admin/block_admin.php</span>:67<br />
<span style="font-weight: bold;">./blocks/admin_bookmarks/block_admin_bookmarks.php</span>:55<br />
<span style="font-weight: bold;">./blocks/admin_bookmarks/create.php</span>:36<br />
<span style="font-weight: bold;">./blocks/admin_bookmarks/delete.php</span>:32<br />
<span style="font-weight: bold;">./blocks/admin_tree/block_admin_tree.php</span>:212:67<br />
<span style="font-weight: bold;">./blocks/certify/certify.php</span>:11<br />
<span style="font-weight: bold;">./blocks/certify/close.php</span>:86<br />
<span style="font-weight: bold;">./blocks/certify/config_instance.html</span>:13<br />
<span style="font-weight: bold;">./blocks/course_summary/block_course_summary.php</span>:33<br />
<span style="font-weight: bold;">./blocks/moodleblock.class.php</span>:475<br />
<span style="font-weight: bold;">./blocks/reports/block_reports.php</span>:41:50:85<br />
<span style="font-weight: bold;">./blocks/trouble_ticket/thanks.php</span>:25<br />
<span style="font-weight: bold;">./calendar/event.php</span>:64<br />
<span style="font-weight: bold;">./calendar/export.php</span>:19<br />
<span style="font-weight: bold;">./calendar/view.php</span>:54<br />
<span style="font-weight: bold;">./config-dist.php</span>:125<br />
<span style="font-weight: bold;">./config.php</span>:23<br />
<span style="font-weight: bold;">./course/category.php</span>:140:384<br />
<span style="font-weight: bold;">./course/delete.php</span>:34:65<br />
<span style="font-weight: bold;">./course/edit.php</span>:118:150<br />
<span style="font-weight: bold;">./course/editcategory.php</span>:179:323<br />
<span style="font-weight: bold;">./course/importstudents.php</span>:19<br />
<span style="font-weight: bold;">./course/mod.php</span>:706<br />
<span style="font-weight: bold;">./course/modedit.php</span>:446<br />
<span style="font-weight: bold;">./course/report/stats/index.php</span>:28<br />
<span style="font-weight: bold;">./course/search.php</span>:275<br />
<span style="font-weight: bold;">./enrol/authorize/enrol.php</span>:414:746<br />
<span style="font-weight: bold;">./enrol/imsenterprise/importnow.php</span>:13<br />
<span style="font-weight: bold;">./filter/algebra/algebradebug.php</span>:261<br />
<span style="font-weight: bold;">./filter/tex/texdebug.php</span>:263<br />
<span style="font-weight: bold;">./grade/report/grader/preferences.php</span>:87<br />
<span style="font-weight: bold;">./index.php</span>:38:56:62:74:83<br />
<span style="font-weight: bold;">./install.php</span>:139:547<br />
<span style="font-weight: bold;">./lib/adminlib.php</span>:3458:3498:3822:3972:3977:3985:4172:4175:4176:4335:776<br />
<span style="font-weight: bold;">./lib/db/mysql.php</span>:1473<br />
<span style="font-weight: bold;">./lib/db/postgres7.php</span>:1216<br />
<span style="font-weight: bold;">./lib/ddllib.php</span>:818:820<br />
<span style="font-weight: bold;">./lib/dmllib.php</span>:510<br />
<span style="font-weight: bold;">./lib/environmentlib.php</span>:320:323<br />
<span style="font-weight: bold;">./lib/moodlelib.php</span>:5099<br />
<span style="font-weight: bold;">./lib/pagelib.php</span>:471<br />
<span style="font-weight: bold;">./lib/setup.php</span>:184:185<br />
<span style="font-weight: bold;">./login/index.php</span>:9<br />
<span style="font-weight: bold;">./mod/assignment/lib.php</span>:2837<br />
<span style="font-weight: bold;">./mod/glossary/formats.php</span>:27:39<br />
<span style="font-weight: bold;">./mod/hotpot/db/update_to_v2.php</span>:519<br />
<span style="font-weight: bold;">./my/pagelib.php</span>:59<br />
<span style="font-weight: bold;">./question/upgrade.php</span>:90<br />
<span style="font-weight: bold;">./user/editadvanced.php</span>:153:158<br />
<span style="font-weight: bold;">./user/index.php</span>:100:542:548<br />
<span style="font-weight: bold;">./user/tabs.php</span>:225:233:235</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ADMINBLOCKS</h3>
<p><span style="font-weight: bold;">./admin/index.php</span>:522</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ADMINEDITALWAYS</h3>
<p><span style="font-weight: bold;">./config-dist.php</span>:147<br />
<span style="font-weight: bold;">./search/documents/forum_document.php</span>:169</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ADMINSEESALL</h3>
<p><span style="font-weight: bold;">./calendar/lib.php</span>:1426:1427</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ADMINUSEHTMLEDITOR</h3>
<p><span style="font-weight: bold;">./admin/settings.php</span>:166<br />
<span style="font-weight: bold;">./admin/upgradesettings.php</span>:58<br />
<span style="font-weight: bold;">./lib/adminlib.php</span>:2607:2608</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;AJAXCAPABLE</h3>
<p><span style="font-weight: bold;">./course/format/topics/ajax.php</span>:7<br />
<span style="font-weight: bold;">./course/format/weeks/ajax.php</span>:7<br />
<span style="font-weight: bold;">./course/view.php</span>:153:158</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;AJAXTESTEDBROWSERS</h3>
<p><span style="font-weight: bold;">./course/format/topics/ajax.php</span>:8<br />
<span style="font-weight: bold;">./course/format/weeks/ajax.php</span>:8<br />
<span style="font-weight: bold;">./course/view.php</span>:154:161</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ALLOWCATEGORYTHEMES</h3>
<p><span style="font-weight: bold;">./course/category.php</span>:97<br />
<span style="font-weight: bold;">./course/editcategory.php</span>:64<br />
<span style="font-weight: bold;">./course/editcategory_form.php</span>:20<br />
<span style="font-weight: bold;">./lib/weblib.php</span>:3003</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ALLOWCOURSETHEMES</h3>
<p><span style="font-weight: bold;">./course/edit_form.php</span>:143<br />
<span style="font-weight: bold;">./lib/weblib.php</span>:2998<br />
<span style="font-weight: bold;">./theme/chameleon/ui/chameleon.php</span>:14<br />
<span style="font-weight: bold;">./theme/chameleon/ui/css.php</span>:18</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ALLOWEMAILADDRESSES</h3>
<p><span style="font-weight: bold;">./lib/moodlelib.php</span>:4440:4441:4457</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ALLOWOBJECTEMBED</h3>
<p><span style="font-weight: bold;">./lib/weblib.php</span>:6584:6590</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ALLOWTHEMECHANGEONURL</h3>
<p><span style="font-weight: bold;">./lib/setup.php</span>:599</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ALLOWUNENROL</h3>
<p><span style="font-weight: bold;">./lib/db/access.php</span>:383</p>
<h3 style="color: #5f5f5f;">$CFG-&gt;ALLOWUSERBLOCKHIDING</h3>
<p><span style="font-weight: bold;">./blocks/moodleblock.class.php</span>:376<br />
<span style="font-weight: bold;">./lib/weblib.php</span>:6479</p>
</div>
<p>The post <a href="http://gl.ib.ly/computing/2009/06/24/configuration-variables-moodle-code-part-two/">All configuration variables in Moodle code &#8211; Part two</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gl.ib.ly/computing/2009/06/24/configuration-variables-moodle-code-part-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching compressed Apache logs</title>
		<link>http://gl.ib.ly/stuff/2009/06/23/searching-compressed-apache-logs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=searching-compressed-apache-logs</link>
		<comments>http://gl.ib.ly/stuff/2009/06/23/searching-compressed-apache-logs/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 06:27:23 +0000</pubDate>
		<dc:creator><![CDATA[tariq]]></dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[bunzip2]]></category>
		<category><![CDATA[compressed]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[one liners]]></category>
		<category><![CDATA[tidbits]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://gl.ib.ly/?p=35</guid>
		<description><![CDATA[<p>From time to time things tend to go wrong and systems tend to go crazy. Sometimes these errors are more of nuisance than anything else, an intermittent annoyance you&#8217;d prefer not to investigate &#8212; trawling through logs is a pain in<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://gl.ib.ly/stuff/2009/06/23/searching-compressed-apache-logs/">Read more &#8250;</a></div><!-- end of .read-more --></p><p>The post <a href="http://gl.ib.ly/stuff/2009/06/23/searching-compressed-apache-logs/">Searching compressed Apache logs</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>From time to time things tend to go wrong and <a title="http://gl.ib.ly/archives/10-Deleting-specific-emails-from-the-postfix-mail-queue.html" href="http://web.archive.org/web/20090814080809/http://gl.ib.ly/exit.php?url_id=65&amp;entry_id=27">systems tend to go crazy</a>. Sometimes these errors are more of nuisance than anything else, an intermittent annoyance you&#8217;d prefer not to investigate &#8212; trawling through logs is a pain in the backside. Now you need to take a peak at those compressed Apache error log files, ugh! Well before you look for suitable places to hang some rope try running some expressions across a certain number of files. Normally you&#8217;d only want to look at logs for the last 7 days, so lets give that a go.</p>
<div>The error messages I am interested in all contain the text <code>Healthcheck</code> so I will use trusty <code>grep</code>find matching lines in the logs. I will use <code>find</code> to get me all the files modified in the last seven days. A program called <code>xargs</code> will then be used to call <code>cat</code> which will pipe to a compression program which finally pipes to <code>grep</code>. Put this all together and you get something like this:</p>
<div>
<pre>find /var/log/apache2 -type f -name "error_*.bz2" -mtime -7 | sort | xargs cat | bunzip2 | grep"Healthcheck"</pre>
</div>
<p>If your files are <i>tar.gz</i> then you&#8217;ll need to replace <code>bunzip2</code> with gzip -dc. So that would look like:</p>
</div>
<div>
<pre>find /var/log/apache2 -type f -name "error_*.tar.gz" -mtime -7 | sort | xargs cat | gzip -dc |grep "Healthcheck"</pre>
<p>Have fun!</p>
</div>
<p>The post <a href="http://gl.ib.ly/stuff/2009/06/23/searching-compressed-apache-logs/">Searching compressed Apache logs</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gl.ib.ly/stuff/2009/06/23/searching-compressed-apache-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Common translation errors in Moodle language packs</title>
		<link>http://gl.ib.ly/stuff/2009/02/06/common-translation-errors-moodle-language-packs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=common-translation-errors-moodle-language-packs</link>
		<comments>http://gl.ib.ly/stuff/2009/02/06/common-translation-errors-moodle-language-packs/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 06:34:33 +0000</pubDate>
		<dc:creator><![CDATA[tariq]]></dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[language pack]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[moodle 1.9]]></category>
		<category><![CDATA[one liners]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://gl.ib.ly/?p=83</guid>
		<description><![CDATA[<p>If you have ever had to deal with language packs you will know how much of a pain they can be. I regularly interact with 9 Moodle language packs and I don&#8217;t like doing that much. For some reason, can&#8217;t<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://gl.ib.ly/stuff/2009/02/06/common-translation-errors-moodle-language-packs/">Read more &#8250;</a></div><!-- end of .read-more --></p><p>The post <a href="http://gl.ib.ly/stuff/2009/02/06/common-translation-errors-moodle-language-packs/">Common translation errors in Moodle language packs</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><span style="color: #545454;">If you have ever had to deal with language packs you will know how much of a pain they can be. I regularly interact with 9 Moodle language packs and I don&#8217;t like doing that much. For some reason, can&#8217;t remember why now, we gave people the raw language string files (PHP code files) to translate and they translated these files and sent them back. Only these people are not PHP coders and they make mistakes. Here is my list of what goes wrong and how to solve.</span></p>
<div class="serendipity_entry_extended" style="color: #545454;"><a id="extended"></a><br />
*Incorrect syntax*<br />
They edit the files and send them back to us, but they delete a semicolon or something. Check all language pack files with the following shell script.</p>
<div class="geshi"><span style="font-style: italic; color: #666666;">#!/bin/bash</span><br />
<span style="font-weight: bold; color: #000000;">for</span> i <span style="font-weight: bold; color: #000000;">in</span> $<span style="font-weight: bold; color: #7a0874;">(</span> <span style="font-weight: bold; color: #c20cb9;">ls</span> *.php<span style="font-weight: bold; color: #7a0874;">)</span>; <span style="font-weight: bold; color: #000000;">do</span><br />
php -l $i<br />
<span style="font-weight: bold; color: #000000;">done</span></div>
<p>On windows try:</p>
<div class="geshi">@<span style="font-weight: bold; color: #7a0874;">echo</span> off<br />
FOR %%A IN <span style="font-weight: bold; color: #7a0874;">(</span>*.php<span style="font-weight: bold; color: #7a0874;">)</span> DO php -l %%A</div>
<p>*UTF8 Header*<br />
This is prepended to the start of some files by certain editors. As the header comes before the<code>&lt;?PHP</code> tag the header gets output and this will do all sorts of nasty things like corrupting user sessions. The solution is to strip utf headers from all files.</p>
<p>I use a script to add and <a style="color: #7da939;" href="http://gl.ib.ly/uploads/moodle/check.php.txt">strip UTF8 headers</a> from entire directories.</p>
<p>*Translated variable names*<br />
When the translators see something like <code>$a-&gt;name</code> they sometimes translate name. Again this isn&#8217;t easy to find but I use the following line to get malformed variable names.</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -nroe <span style="color: #ff0000;">&#8220;\$a-&gt;[^ .\&lt;&gt;/';:\!,\?)(]*&#8221;</span> PATH_TO_DIR | <span style="font-weight: bold; color: #c20cb9;">grep</span> -v <span style="color: #ff0000;">&#8220;\$a-&gt;[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*&#8221;</span></div>
<blockquote style="color: #76767a;">
<pre>PATH_TO_DIR/block_class_list.php:14:$a-&gt;
PATH_TO_DIR/block_task_list.php:30:$a-&gt;
PATH_TO_DIR/block_task_list.php:34:$a-&gt;
PATH_TO_DIR/block_task_list.php:34:$a-&gt;ì ëª©</pre>
</blockquote>
<p>This has caught all issues of this kind to date (for me), but it does rely on illegal variable names. A better approach would be to keep a whitelist of variables extracted from a known good language pack. If we find anything that looks like a variable in a another language pack and doesn&#8217;t appear on this list we can throw an error.</p>
<p>*Converting files to UTF-8 format*<br />
Sometimes countries (especially those using accented languages) tend to send us ASCII encoded files, these files will have to be converted to UTF-8 format so that accented characters are display correctly.</p>
<p>Here is a one liner to convert all files in the current directory to UTF-8 format:</p>
<div class="geshi"><span style="font-weight: bold; color: #000000;">for</span> f <span style="font-weight: bold; color: #000000;">in</span> ./*; <span style="font-weight: bold; color: #000000;">do</span> `<span style="font-weight: bold; color: #c20cb9;">mv</span> $f $f<span style="color: #ff0000;">&#8220;.bak&#8221;</span>; iconv &#8211;from-code iso-<span style="color: #000000;">8859</span>-<span style="color: #000000;">1</span> &#8211;to-code UTF-<span style="color: #000000;">8</span> $f<span style="color: #ff0000;">&#8220;.bak&#8221;</span> &gt; $f`;<span style="font-weight: bold; color: #000000;">done</span></div>
<p>If you are happy with changes do a</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">rm</span> *.bak</div>
<p>See also: <a style="color: #7da939;" title="http://en.wikipedia.org/wiki/ISO_8859-1" href="http://web.archive.org/web/20110212133444/http://gl.ib.ly/exit.php?url_id=78&amp;entry_id=23">ISO 8859-1</a> and <a style="color: #7da939;" title="http://docs.moodle.org/en/Converting_files_to_UTF-8" href="http://web.archive.org/web/20110212133444/http://gl.ib.ly/exit.php?url_id=79&amp;entry_id=23">Converting files to UTF-8</a>.</p>
<p>*Other things which go wrong*<br />
Translators might change <code>$string['mystring'] = 'Hello $a!';</code> to <code>$string['mystring'] = "Hello $a!";</code>. Subtly $a will just not appear in the output as the double quoted string will be evaluated before Moodle can swap $a with some dynamic data. The following one liner catches most errors for me even though it isn&#8217;t complete.</p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -nro <span style="color: #ff0000;">&#8220;= \&#8221;</span><span style="color: #ff0000;">&#8221; PATH_TO_DIR</span></div>
<p>I guess you could lump all that together in one nice big shell script. If you do send me a copy <img class="emoticon" src="http://web.archive.org/web/20110212133444im_/http://gl.ib.ly/templates/default/img/emoticons/wink.png" alt=";-)" /></p>
</div>
<p>The post <a href="http://gl.ib.ly/stuff/2009/02/06/common-translation-errors-moodle-language-packs/">Common translation errors in Moodle language packs</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gl.ib.ly/stuff/2009/02/06/common-translation-errors-moodle-language-packs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The command prompt has been disabled by your administrator?</title>
		<link>http://gl.ib.ly/stuff/2009/02/05/command-prompt-disabled-administrator/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=command-prompt-disabled-administrator</link>
		<comments>http://gl.ib.ly/stuff/2009/02/05/command-prompt-disabled-administrator/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 06:32:03 +0000</pubDate>
		<dc:creator><![CDATA[tariq]]></dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[cmd.exe]]></category>
		<category><![CDATA[gpo]]></category>
		<category><![CDATA[one liners]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sfk]]></category>
		<category><![CDATA[swiss file knife]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xxd]]></category>

		<guid isPermaLink="false">http://gl.ib.ly/?p=39</guid>
		<description><![CDATA[<p>I came across an old enough post on Didier&#8217;s blog about Group policies that have disabled cmd.exe from running. Didier mentions a few ways to get cmd.exe to run. The suggestion I like the most is to find the DisableCMD string in cmd.exe<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://gl.ib.ly/stuff/2009/02/05/command-prompt-disabled-administrator/">Read more &#8250;</a></div><!-- end of .read-more --></p><p>The post <a href="http://gl.ib.ly/stuff/2009/02/05/command-prompt-disabled-administrator/">The command prompt has been disabled by your administrator?</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I came across an old enough post on Didier&#8217;s blog about <a title="http://blog.didierstevens.com/2007/11/28/quickpost-disableamd-disableregistryfools/trackback/" href="http://web.archive.org/web/20090703174900/http://gl.ib.ly/exit.php?url_id=46&amp;entry_id=22">Group policies that have disabled cmd.exe from running</a>. Didier mentions a few ways to get cmd.exe to run. The suggestion I like the most is to find the <i>DisableCMD</i> string in cmd.exe and change it to <i>DisableAMD</i> using a hex editor. Thankfully there is a tool which will allow us to patch cmd.exe in one tiny line.</p>
<div>The tool is <a title="http://stahlforce.com/dev/swiss-file-knife.html" href="http://web.archive.org/web/20090703174900/http://gl.ib.ly/exit.php?url_id=47&amp;entry_id=22">Swiss File Knife</a> and it is fantabulous. Luckily it is available on Windows as well as Linux. Oh yeah, the command!Well first make a copy of your cmd.exe (%SYSTEMROOT%\System32\cmd.exe) file, mine is called cmd2.exe.</p>
<pre>sfk replace cmd2.exe -binary /440069007300610062006c00650043004D004400/440069007300610062006c00650041004D004400/</pre>
<p>A quick explanation of what is being changed</p>
<pre>  D   i   s   a   b   l   e   C   M  D           ... to...
 440069007300610062006c00650043004D004400
  D   i   s   a   b   l   e   A   M  D    
 440069007300610062006c00650043004D004400</pre>
<p>You can check your changes are all right if you see the following.</p>
<div>xxd cmd2.exe | egrep  -A1 &#8220;D.i.s.a&#8221;</div>
<pre>00040d0: 4400 6900 7300 6100 6200 6c00 6500 5500  D.i.s.a.b.l.e.U.
00040e0: 4e00 4300 4300 6800 6500 6300 6b00 0000  N.C.C.h.e.c.k...
--
0013d40: 7e05 ffff 4400 6900 7300 6100 6200 6c00  ~...D.i.s.a.b.l.
0013d50: 6500 4100 4d00 4400 0000 6689 18e9 def4  e.A.M.D...f.....
--
004a400: 2000 2000 2000 4400 6900 7300 6100 6200   . . .D.i.s.a.b.
004a410: 6c00 6500 2000 6500 7800 6500 6300 7500  l.e. .e.x.e.c.u.
--
004aad0: 2000 4400 6900 7300 6100 6200 6c00 6500   .D.i.s.a.b.l.e.
004aae0: 2000 6400 6500 6c00 6100 7900 6500 6400   .d.e.l.a.y.e.d.</pre>
</div>
<p>The post <a href="http://gl.ib.ly/stuff/2009/02/05/command-prompt-disabled-administrator/">The command prompt has been disabled by your administrator?</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gl.ib.ly/stuff/2009/02/05/command-prompt-disabled-administrator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deleting specific emails from the postfix mail queue</title>
		<link>http://gl.ib.ly/stuff/2009/01/08/deleting-specific-emails-postfix-mail-queue/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=deleting-specific-emails-postfix-mail-queue</link>
		<comments>http://gl.ib.ly/stuff/2009/01/08/deleting-specific-emails-postfix-mail-queue/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 06:16:30 +0000</pubDate>
		<dc:creator><![CDATA[tariq]]></dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mailq]]></category>
		<category><![CDATA[one liners]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[postsuper]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://gl.ib.ly/?p=32</guid>
		<description><![CDATA[<p>A week ago a development database server lost power, which is usually no big deal only that I have some reporting scripts that run every 5 minutes for each database. When these databases became unavailable they (the scripts) like to<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://gl.ib.ly/stuff/2009/01/08/deleting-specific-emails-postfix-mail-queue/">Read more &#8250;</a></div><!-- end of .read-more --></p><p>The post <a href="http://gl.ib.ly/stuff/2009/01/08/deleting-specific-emails-postfix-mail-queue/">Deleting specific emails from the postfix mail queue</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>A week ago a development database server lost power, which is usually no big deal only that I have some reporting scripts that run every 5 minutes for each database. When these databases became unavailable they (the scripts) like to send me a quick mail telling me what went wrong. The network switch also was out of action so there was no route to the outside world from this small development network. The server lost power for three days and a massive amount of mail built up in the mail queue. When power was restored the SPAM started pouring in.</p>
<div>
<p>As I started to receive the first wave of mails I logged into the server a did the typical <code>sudo mailq | wc -l</code> which showed 13,000 emails waiting to make their way down the ether. Unfortunately I couldn&#8217;t just delete all mail on this server so I had to think up a quick way to delete only the stuff I needed to; however, luckily, all my outgoing mail was sent from a unique address <i>database-reporter@my.dev.box</i>. Using this information I came up with the following one liner (in all its unedited glory).</p>
<pre style="padding-left: 30px;"># Executed as root
mailq | grep "database-reporter@my.dev.box" | awk '{ system("/usr/sbin/postsuper -d "$1); }'</pre>
<p>Now there are about a gazillion ways to do this (many are better) but I needed something which would stop those mails flying about the place before I got blacklisted and it worked, so there.<i>mailq</i> gets me a list of emails in postfix&#8217;s mail queue; <i>grep</i> gets me only the mails I am interested in; <i>awk</i> pulls out the mailID and uses it to issue a command to delete mail from the mailqueue with that id; simple.One better way to do this line could be:</p>
<pre style="padding-left: 30px;"># Executed as root
 mailq | grep "database-reporter@my.dev.box" | awk '{ print($1); }' | /usr/sbin/postsuper -d -</pre>
<p>This should be a lot quicker, as <i>postsuper</i> will read all the piped IDs and delete them as they arrive at STDIN. There is some good info in the <a title="http://www.postfix.org/postsuper.1.html" href="http://web.archive.org/web/20090531000552/http://gl.ib.ly/exit.php?url_id=12&amp;entry_id=10">man postfix</a> pages under the <i>-d</i> option.</p>
<p>A quick GFI came up with <a title="http://www.ubuntudog.com/?article=19" href="http://web.archive.org/web/20090531000552/http://gl.ib.ly/exit.php?url_id=13&amp;entry_id=10">Deleting mail in postfix queue (mailq)</a> which was about all the reference I needed.</p>
</div>
<p>The post <a href="http://gl.ib.ly/stuff/2009/01/08/deleting-specific-emails-postfix-mail-queue/">Deleting specific emails from the postfix mail queue</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gl.ib.ly/stuff/2009/01/08/deleting-specific-emails-postfix-mail-queue/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>All configuration variables in Moodle code?</title>
		<link>http://gl.ib.ly/uncategorized/2008/12/15/configuration-variables-moodle-code-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=configuration-variables-moodle-code-2</link>
		<comments>http://gl.ib.ly/uncategorized/2008/12/15/configuration-variables-moodle-code-2/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 07:10:15 +0000</pubDate>
		<dc:creator><![CDATA[tariq]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cfg]]></category>
		<category><![CDATA[configuration variables]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[moodle_19]]></category>
		<category><![CDATA[one liners]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://gl.ib.ly/?p=89</guid>
		<description><![CDATA[<p>Sometimes Moodle introduces some nice new configuration variables and I like to make sure that I know what they are and where they are. So to begin my investigation without heading off to the web I use the following command<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://gl.ib.ly/uncategorized/2008/12/15/configuration-variables-moodle-code-2/">Read more &#8250;</a></div><!-- end of .read-more --></p><p>The post <a href="http://gl.ib.ly/uncategorized/2008/12/15/configuration-variables-moodle-code-2/">All configuration variables in Moodle code?</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><span style="color: #545454;">Sometimes Moodle introduces some nice new configuration variables and I like to make sure that I know what they are and where they are. So to begin my investigation without heading off to the web I use the following command to get me a sorted list of the $CFG variables.</span></p>
<div class="serendipity_entry_extended" style="color: #545454;"><a id="extended"></a></p>
<div class="geshi"><span style="font-weight: bold; color: #c20cb9;">grep</span> -r &#8211;no-filename -o &#8216;\$CFG-&gt;<span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span><span style="font-weight: bold; color: #7a0874;">[</span>a-z<span style="font-weight: bold; color: #7a0874;">]</span>*&#8217; &lt;path_to_moodle&gt; | <span style="font-weight: bold; color: #c20cb9;">sort</span> -u</div>
<p>Good old trusty grep is used once again. We use grep to recursively, <i>-r</i>, look at all the files in the <i>path_to_moodle</i>. We tell grep to not print out the file names that patterns where found in with <i>&#8211;no-filename</i> and the <i>-o</i> option tells grep to output the exact pattern matched. The pattern itself is of the form: starts with <i>&#8220;$CFG-&gt;&#8221;</i> and is followed by one, or more lowercase characters. The pipe to <i>sort -u</i> sorts output and removes duplicate strings.</p>
<p>This command will produce something like the following list which I made using <a style="color: #7da939;" title="http://moodle.org" href="http://web.archive.org/web/20110315054119/http://gl.ib.ly/exit.php?url_id=11&amp;entry_id=8">Moodle</a> 1.9.2.</p>
<p><code>$CFG-&gt;admin<br />
$CFG-&gt;adminblocks<br />
$CFG-&gt;admineditalways<br />
$CFG-&gt;adminseesall<br />
$CFG-&gt;adminusehtmleditor<br />
$CFG-&gt;ajaxcapable<br />
$CFG-&gt;ajaxtestedbrowsers<br />
$CFG-&gt;allowcategorythemes<br />
$CFG-&gt;allowcoursethemes<br />
$CFG-&gt;allowemailaddresses<br />
$CFG-&gt;allowobjectembed<br />
$CFG-&gt;allowthemechangeonurl<br />
$CFG-&gt;allowunenrol<br />
$CFG-&gt;allowuserblockhiding<br />
$CFG-&gt;allowusermailcharset<br />
$CFG-&gt;allowuserthemes<br />
$CFG-&gt;allowvisiblecoursesinhiddencategories<br />
$CFG-&gt;allusersaresitestudents<br />
$CFG-&gt;alternateloginurl<br />
$CFG-&gt;an<br />
$CFG-&gt;apacheloguser<br />
$CFG-&gt;apachemaxmem<br />
$CFG-&gt;aspellextradicts<br />
$CFG-&gt;aspellpath<br />
$CFG-&gt;assignment<br />
$CFG-&gt;attemptuniqueid<br />
$CFG-&gt;auth<br />
$CFG-&gt;autolang<br />
$CFG-&gt;autologinguests<br />
$CFG-&gt;backup<br />
$CFG-&gt;block<br />
$CFG-&gt;blocks<br />
$CFG-&gt;blocksdrag<br />
$CFG-&gt;blog<br />
$CFG-&gt;bloglevel<br />
$CFG-&gt;bounceratio<br />
$CFG-&gt;cachetext<br />
$CFG-&gt;cachetype<br />
$CFG-&gt;calendar<br />
$CFG-&gt;chat<br />
$CFG-&gt;clamfailureonupload<br />
$CFG-&gt;config<br />
$CFG-&gt;cookiehttponly<br />
$CFG-&gt;cookiesecure<br />
$CFG-&gt;country<br />
$CFG-&gt;coursemanager<br />
$CFG-&gt;coursemanagers<br />
$CFG-&gt;coursesperpage<br />
$CFG-&gt;coursetheme<br />
$CFG-&gt;creatornewroleid<br />
$CFG-&gt;cronclionly<br />
$CFG-&gt;cronremotepassword<br />
$CFG-&gt;currenttextiscacheable<br />
$CFG-&gt;customersupportemail<br />
$CFG-&gt;customersupportemaildisplay<br />
$CFG-&gt;customscripts<br />
$CFG-&gt;data<br />
$CFG-&gt;datadir<br />
$CFG-&gt;dataroot<br />
$CFG-&gt;dbfamily<br />
$CFG-&gt;dbhost<br />
$CFG-&gt;dblogerror<br />
$CFG-&gt;dbname<br />
$CFG-&gt;dbpass<br />
$CFG-&gt;dbpersist<br />
$CFG-&gt;dbsessions<br />
$CFG-&gt;dbtype<br />
$CFG-&gt;dbuser<br />
$CFG-&gt;debug<br />
$CFG-&gt;debugdisplay<br />
$CFG-&gt;debugsmtp<br />
$CFG-&gt;decsbureauid<br />
$CFG-&gt;decsitemtypeid<br />
$CFG-&gt;defaultallowedmodules<br />
$CFG-&gt;defaultblocks<br />
$CFG-&gt;defaultcourseroleid<br />
$CFG-&gt;defaultfrontpageroleid<br />
$CFG-&gt;defaultrequestcategory<br />
$CFG-&gt;defaultuserroleid<br />
$CFG-&gt;deleteunconfirmed<br />
$CFG-&gt;denyemailaddresses<br />
$CFG-&gt;detect<br />
$CFG-&gt;digestmailtime<br />
$CFG-&gt;digestmailtimelast<br />
$CFG-&gt;directorypermissions<br />
$CFG-&gt;dirroot<br />
$CFG-&gt;disablebyteserving<br />
$CFG-&gt;disablecourseajax<br />
$CFG-&gt;disableglobalshack<br />
$CFG-&gt;disablegradehistory<br />
$CFG-&gt;disablemycourses<br />
$CFG-&gt;disablescheduledbackups<br />
$CFG-&gt;disablestatsprocessing<br />
$CFG-&gt;disableupgradelogging<br />
$CFG-&gt;disableuserimages<br />
$CFG-&gt;displaydebug<br />
$CFG-&gt;displayloginfailures<br />
$CFG-&gt;docroot<br />
$CFG-&gt;doctonewwindow<br />
$CFG-&gt;eaccelerator<br />
$CFG-&gt;editorbackgroundcolor<br />
$CFG-&gt;editordictionary<br />
$CFG-&gt;editorfontfamily<br />
$CFG-&gt;editorfontlist<br />
$CFG-&gt;editorfontsize<br />
$CFG-&gt;editorformatlist<br />
$CFG-&gt;editorhidebuttons<br />
$CFG-&gt;editorkillword<br />
$CFG-&gt;editorspelling<br />
$CFG-&gt;editorsrc<br />
$CFG-&gt;emailconnectionerrorsto<br />
$CFG-&gt;emoticons<br />
$CFG-&gt;enableajax<br />
$CFG-&gt;enablecourserequests<br />
$CFG-&gt;enableglobalsearch<br />
$CFG-&gt;enableglobalshack<br />
$CFG-&gt;enablegroupings<br />
$CFG-&gt;enablehtmlpurifier<br />
$CFG-&gt;enableoutcomes<br />
$CFG-&gt;enablerecordcache<br />
$CFG-&gt;enablerssfeeds<br />
$CFG-&gt;enablestats<br />
$CFG-&gt;enabletrusttext<br />
$CFG-&gt;enrol<br />
$CFG-&gt;errordocroot<br />
$CFG-&gt;exercise<br />
$CFG-&gt;extendedusernamechars<br />
$CFG-&gt;extratabs<br />
$CFG-&gt;filelifetime<br />
$CFG-&gt;filter<br />
$CFG-&gt;filterall<br />
$CFG-&gt;filtermatchoneperpage<br />
$CFG-&gt;filtermatchonepertext<br />
$CFG-&gt;filteruploadedfiles<br />
$CFG-&gt;footer<br />
$CFG-&gt;footerlinks<br />
$CFG-&gt;forcefirstname<br />
$CFG-&gt;forcelastname<br />
$CFG-&gt;forcelogin<br />
$CFG-&gt;forceloginforprofiles<br />
$CFG-&gt;forcetimezone<br />
$CFG-&gt;forgottenpasswordurl<br />
$CFG-&gt;formatstring<br />
$CFG-&gt;formatstringstriptags<br />
$CFG-&gt;forum<br />
$CFG-&gt;framename<br />
$CFG-&gt;frametarget<br />
$CFG-&gt;frontpage<br />
$CFG-&gt;frontpageloggedin<br />
$CFG-&gt;fullnamedisplay<br />
$CFG-&gt;gdversion<br />
$CFG-&gt;geoipfile<br />
$CFG-&gt;glossary<br />
$CFG-&gt;googlemapkey<br />
$CFG-&gt;grade<br />
$CFG-&gt;gradebookroles<br />
$CFG-&gt;gradeexport<br />
$CFG-&gt;gradehistorylifetime<br />
$CFG-&gt;gradepublishing<br />
$CFG-&gt;guestloginbutton<br />
$CFG-&gt;guestroleid<br />
$CFG-&gt;handlebounces<br />
$CFG-&gt;header<br />
$CFG-&gt;hiddenuserfields<br />
$CFG-&gt;hideactivitytypenavlink<br />
$CFG-&gt;hivecbid<br />
$CFG-&gt;hivehost<br />
$CFG-&gt;hivepassword<br />
$CFG-&gt;hivepath<br />
$CFG-&gt;hiveport<br />
$CFG-&gt;hiveprotocol<br />
$CFG-&gt;hiveusername<br />
$CFG-&gt;hotpot<br />
$CFG-&gt;hotpotismobile<br />
$CFG-&gt;hotpotroot<br />
$CFG-&gt;hotpottemplate<br />
$CFG-&gt;htmleditor<br />
$CFG-&gt;httpsthemewww<br />
$CFG-&gt;httpswwwroot<br />
$CFG-&gt;ignoresesskey<br />
$CFG-&gt;intcachemax<br />
$CFG-&gt;iplookup<br />
$CFG-&gt;javascript<br />
$CFG-&gt;journal<br />
$CFG-&gt;keeptagnamecase<br />
$CFG-&gt;lams<br />
$CFG-&gt;lang<br />
$CFG-&gt;langcache<br />
$CFG-&gt;langlist<br />
$CFG-&gt;langmenu<br />
$CFG-&gt;lastexpirynotify<br />
$CFG-&gt;lastnotifyfailure<br />
$CFG-&gt;latinexcelexport<br />
$CFG-&gt;ldap<br />
$CFG-&gt;libdir<br />
$CFG-&gt;local<br />
$CFG-&gt;locale<br />
$CFG-&gt;loginaspassword<br />
$CFG-&gt;loginhttps<br />
$CFG-&gt;loglifetime<br />
$CFG-&gt;logsql<br />
$CFG-&gt;longtimenosee<br />
$CFG-&gt;maildomain<br />
$CFG-&gt;mailnewline<br />
$CFG-&gt;mailprefix<br />
$CFG-&gt;max<br />
$CFG-&gt;maxbytes<br />
$CFG-&gt;maxeditingtime<br />
$CFG-&gt;memcachedhosts<br />
$CFG-&gt;memcachedpconn<br />
$CFG-&gt;message<br />
$CFG-&gt;messagewasjustemailed<br />
$CFG-&gt;messaging<br />
$CFG-&gt;migrated<br />
$CFG-&gt;minbounces<br />
$CFG-&gt;minpassworddigits<br />
$CFG-&gt;minpasswordlength<br />
$CFG-&gt;minpasswordlower<br />
$CFG-&gt;minpasswordnonalphanum<br />
$CFG-&gt;minpasswordupper<br />
$CFG-&gt;mnet<br />
$CFG-&gt;moddata<br />
$CFG-&gt;modpixpath<br />
$CFG-&gt;my<br />
$CFG-&gt;mymoodleredirect<br />
$CFG-&gt;noconvertjournals<br />
$CFG-&gt;nodefaultuserrolelists<br />
$CFG-&gt;noemailever<br />
$CFG-&gt;nofixday<br />
$CFG-&gt;nolastloggedin<br />
$CFG-&gt;nonmetacoursesyncroleids<br />
$CFG-&gt;noreplyaddress<br />
$CFG-&gt;notifyloginfailures<br />
$CFG-&gt;notifyloginthreshold<br />
$CFG-&gt;notloggedinroleid<br />
$CFG-&gt;old<br />
$CFG-&gt;opentogoogle<br />
$CFG-&gt;os<br />
$CFG-&gt;ostype<br />
$CFG-&gt;pagepath<br />
$CFG-&gt;pagetheme<br />
$CFG-&gt;passwordpolicy<br />
$CFG-&gt;passwordsaltmain<br />
$CFG-&gt;pathtoclam<br />
$CFG-&gt;pathtodu<br />
$CFG-&gt;perfdebug<br />
$CFG-&gt;pixpath<br />
$CFG-&gt;preferlinegraphs<br />
$CFG-&gt;prefix<br />
$CFG-&gt;preventaccesstohiddenfiles<br />
$CFG-&gt;protectusernames<br />
$CFG-&gt;proxyhost<br />
$CFG-&gt;proxypassword<br />
$CFG-&gt;proxyport<br />
$CFG-&gt;proxytype<br />
$CFG-&gt;proxyuser<br />
$CFG-&gt;qtype<br />
$CFG-&gt;quarantinedir<br />
$CFG-&gt;quiz<br />
$CFG-&gt;rcache<br />
$CFG-&gt;rcachettl<br />
$CFG-&gt;recaptchaprivatekey<br />
$CFG-&gt;recaptchapublickey<br />
$CFG-&gt;registerauth<br />
$CFG-&gt;registered<br />
$CFG-&gt;release<br />
$CFG-&gt;repository<br />
$CFG-&gt;repositoryactivate<br />
$CFG-&gt;repositorywebroot<br />
$CFG-&gt;resource<br />
$CFG-&gt;resourcetrimlength<br />
$CFG-&gt;respectsessionsettings<br />
$CFG-&gt;restrictbydefault<br />
$CFG-&gt;restrictmodulesfor<br />
$CFG-&gt;rolesactive<br />
$CFG-&gt;runclamonupload<br />
$CFG-&gt;running<br />
$CFG-&gt;scorm<br />
$CFG-&gt;search<br />
$CFG-&gt;session<br />
$CFG-&gt;sessioncookie<br />
$CFG-&gt;sessioncookiepath<br />
$CFG-&gt;sessiontimeout<br />
$CFG-&gt;showblocksonmodpages<br />
$CFG-&gt;showcrondebugging<br />
$CFG-&gt;showcronsql<br />
$CFG-&gt;siteblocksadded<br />
$CFG-&gt;siteidentifier<br />
$CFG-&gt;sitemailcharset<br />
$CFG-&gt;sitepolicy<br />
$CFG-&gt;slasharguments<br />
$CFG-&gt;smartpix<br />
$CFG-&gt;smtphosts<br />
$CFG-&gt;smtpmaxbulk<br />
$CFG-&gt;smtppass<br />
$CFG-&gt;smtpuser<br />
$CFG-&gt;sso<br />
$CFG-&gt;statscatdepth<br />
$CFG-&gt;statsfirstrun<br />
$CFG-&gt;statsmaxruntime<br />
$CFG-&gt;statsrolesupgraded<br />
$CFG-&gt;statsruntimestarthour<br />
$CFG-&gt;statsruntimestartminute<br />
$CFG-&gt;statsuserthreshold<br />
$CFG-&gt;stringfilters<br />
$CFG-&gt;stylesheets<br />
$CFG-&gt;supportemail<br />
$CFG-&gt;supportname<br />
$CFG-&gt;supportpage<br />
$CFG-&gt;tagsort<br />
$CFG-&gt;template<br />
$CFG-&gt;textfilters<br />
$CFG-&gt;textfilterx<br />
$CFG-&gt;theme<br />
$CFG-&gt;themedir<br />
$CFG-&gt;themelist<br />
$CFG-&gt;themeorder<br />
$CFG-&gt;themewww<br />
$CFG-&gt;timezone<br />
$CFG-&gt;tracksessionip<br />
$CFG-&gt;type<br />
$CFG-&gt;unicodecleanfilename<br />
$CFG-&gt;unicodedb<br />
$CFG-&gt;unzip<br />
$CFG-&gt;upgrade<br />
$CFG-&gt;usepaypalsandbox<br />
$CFG-&gt;usesid<br />
$CFG-&gt;usetags<br />
$CFG-&gt;version<br />
$CFG-&gt;wiki<br />
$CFG-&gt;wordlist<br />
$CFG-&gt;workshop<br />
$CFG-&gt;wwwdir<br />
$CFG-&gt;wwwroot<br />
$CFG-&gt;xml<br />
$CFG-&gt;xmldbdisablecommentchecking<br />
$CFG-&gt;xmldbdisablenextprevchecking<br />
$CFG-&gt;xmldbreconstructprevnext<br />
$CFG-&gt;xmlstrictheaders<br />
$CFG-&gt;zip</code></div>
<p>The post <a href="http://gl.ib.ly/uncategorized/2008/12/15/configuration-variables-moodle-code-2/">All configuration variables in Moodle code?</a> appeared first on <a href="http://gl.ib.ly">GL.IB.LY</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gl.ib.ly/uncategorized/2008/12/15/configuration-variables-moodle-code-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
