tag:blogger.com,1999:blog-42326851990436582412024-03-13T20:42:16.070+00:00GnuByExampleGaryhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.comBlogger50125tag:blogger.com,1999:blog-4232685199043658241.post-70607113139339367282023-06-20T18:30:00.004+01:002023-06-26T11:33:24.219+01:00Chapter 5 - The Ribbitty story and Good / Bad intentions<p>Working on a book about tech landscape and may occasionally publish draft chapters [ in preview ]</p><p>The first two previews are likely to be ... <br /></p><ul><li>Chapter 5: "The Ribbitty story and Good / Bad intentions" [ pdf was available ]</li><li>Chapter 4: "[re]selling the Maginot line" </li></ul><p>Still no final title for the book, but expected in 2023<br /></p>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.comtag:blogger.com,1999:blog-4232685199043658241.post-49777128086088753402020-02-17T21:23:00.001+00:002020-02-17T21:29:36.333+00:00helm 2 on Debian 10There is a fairly recent go 1.13.6 in Debian 10 backports so add that to your repositories list and apt-get update to refresh.<br />
<br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">apt-get -d install golang-1.13</span></li>
</ul>
The version of Helm 2 installed here will be<br />
<br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">helm-v<b>2.16.1</b>-linux-amd64</span> </li>
</ul>
<br />
Helm version 2 still uses 'tiller' so our init and readyness for letsencrypt will be as follows:<br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">kubectl label ... </span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">helm init --service-account tiller --history-max 200</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">kubectl apply --validate=false -f 00-crds.yaml</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">kubectl create namespace cert-manager </span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">helm repo add jetstack https://charts.jetstack.io</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">helm repo update</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">helm install ... </span></li>
</ul>
.
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-78251428732907771292019-10-08T22:09:00.001+01:002019-10-08T22:09:39.774+01:00Elitebook and other ryzen based laptopsAlthough Debian 10 and other recent Linux include a <b>amdgpu</b> display driver, it is still very new and only a portion of the cpu range is fully supported.<br />
<br />
If in any doubt, and you don't fancy wrestling with xorg.conf, then you can install the non-free firmware '<b>firmware-amd-graphics</b>' (see link)<br />
<br />
This was the quickest solution for me and got me up and running with a Graphical desktop.<br />
<br />
Note: Ensure you have non-free enabled in sources.list or manually download the deb to install.<br />
<br />
Links and ref:<br />
<ul>
<li><a href="https://packages.debian.org/buster/firmware-amd-graphics" rel="nofollow">firmware-amd-graphics - debian 10 buster</a></li>
<li><a href="https://askubuntu.com/questions/1177734/screen-tear-in-19-04-on-ryzen-5-2400g">https://askubuntu.com/questions/1177734/screen-tear-in-19-04-on-ryzen-5-2400g</a></li>
<li><a href="https://duckduckgo.com/?q=ryzen+linux+display">https://duckduckgo.com/?q=ryzen+linux+display</a></li>
</ul>
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-28126554212434061532016-01-17T13:51:00.000+00:002016-01-17T13:51:27.354+00:00gedit3 - external tools - add<pre>apt-get install gedit-plugins</pre>
<br />
Next enable the plugin in Gedit<br />
<br />
Having external tools enabled you should be able to see a short list of available external tools<br />
<br />
To add a new external tool you should use the menu option shown in the next screenshot<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4jBHxAd8uhKBjtLgNpcAVimsZhud1FaN6WkEWh3T-zeaRODpSdijDMk4VDJb7G5sGwU-4D0DPkORSuUUpQg1i4SsU-7up5uf7XiGs1xYtKhfUHanoxElrW6_riRSMPUdEQ2LZzDyP9I4/s1600/gedit_external_tools_manage__2016Q1gedit3.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4jBHxAd8uhKBjtLgNpcAVimsZhud1FaN6WkEWh3T-zeaRODpSdijDMk4VDJb7G5sGwU-4D0DPkORSuUUpQg1i4SsU-7up5uf7XiGs1xYtKhfUHanoxElrW6_riRSMPUdEQ2LZzDyP9I4/s1600/gedit_external_tools_manage__2016Q1gedit3.jpeg" /></a></div>
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-67168343130802568732015-10-10T12:24:00.002+01:002015-10-11T19:04:38.788+01:00xfce - drag application to panelSo you have a fresh desktop install with Xfce<br />
<br />
Perhaps you wanted the default panel setup, or maybe not.<br />
<br />
With a single blank panel, you need to use panel preferences by right clicking on any panel to add some more.<br />
<br />
<h3>
But blank panels are no use - drag and drop applications?</h3>
You probably already have xfce4-appfinder installed as part of Xfce desktop<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj63GLxXR2XPRXz89IXNi5hPV4znMs_4p2ZJjaA2W0wyulWL6KcwDF7pMA22GUP766G7sCgCU6gwjNqhNrV5LEpl8m5PcFYgRvlhQM5y3rpBD_oztTWqsiuFLYGLP7XUq54PA7Y6Yq1PQA/s1600/xfce4appfinder__2015Q3.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj63GLxXR2XPRXz89IXNi5hPV4znMs_4p2ZJjaA2W0wyulWL6KcwDF7pMA22GUP766G7sCgCU6gwjNqhNrV5LEpl8m5PcFYgRvlhQM5y3rpBD_oztTWqsiuFLYGLP7XUq54PA7Y6Yq1PQA/s1600/xfce4appfinder__2015Q3.jpeg" /></a></div>
<br />
Running xfce4-appfinder (Alt+F3) will bring up a selection menu from which you can drag and drop items to the panel.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDB8MY7BhFsRupzG_TIijGXQlqGTfEV31ur9jl5VnvlrMnetK7BggHVF42iyLT_SkwVDBpVFjNtKaNZh9tCbhxG9gTtnShqtyt5PvZkkMTCCEgdpcsxMsFuIoqiOXcN9px54jEkMr_8eA/s1600/xfce4appfinder_office__2015Q3.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="518" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDB8MY7BhFsRupzG_TIijGXQlqGTfEV31ur9jl5VnvlrMnetK7BggHVF42iyLT_SkwVDBpVFjNtKaNZh9tCbhxG9gTtnShqtyt5PvZkkMTCCEgdpcsxMsFuIoqiOXcN9px54jEkMr_8eA/s640/xfce4appfinder_office__2015Q3.jpeg" width="640" /></a></div>
<br />
<br />
<br />
<b>The drag and drop process is not flawless</b> and if when you get your item to the panel it does not have a '+' symbol, then it will drop into the ether rather than fixing to the panel.<br />
<br />
( If you do not see '+' symbol then have the item drag off the panel and then move it back on before dropping ) <br />
<br />
Successful drop onto the panel results in a brief dialogue box confirmation and selecting 'Create Launcher' will complete the job.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6WWo2chL-vRT74vjlTY0zAaNLCexRWSPimHZjXpSj7hXrUoFvlglK-_2xC_oecQAaSTVwDbREJQ2r3qtt_kgkMPTza3IqlCY5Q-CL_Ih8Q1Z28x8lgh5XYnFa9PD6xVzNu-hC9rTkFFM/s1600/xfce4appfinder_create_launcher__2015Q3.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6WWo2chL-vRT74vjlTY0zAaNLCexRWSPimHZjXpSj7hXrUoFvlglK-_2xC_oecQAaSTVwDbREJQ2r3qtt_kgkMPTza3IqlCY5Q-CL_Ih8Q1Z28x8lgh5XYnFa9PD6xVzNu-hC9rTkFFM/s1600/xfce4appfinder_create_launcher__2015Q3.jpeg" /></a></div>
<br />
Once you have setup a few panels on a home desktop it is pretty quick to repeat the process.<br />
You should be able to do similar on your laptop with less than 5 minutes extra work.<br />
<br />
You desktop might stay unchanged for a couple of years and so investing 15 minutes total in a couple of setups is worthwhile.<br />
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-37574588919235974252015-10-03T22:31:00.002+01:002015-10-03T22:31:59.503+01:00Saltstack salt-ssh - getting startedWhen first experimenting with <b>salt-ssh</b>, you might be feeling your way around and encounter some of these issues.<br />
<br />
Proper reading of the documentation and understanding of how <b>salt-ssh </b>operates with rosters will avoid some of those listed, but I describe them below anyway.<br />
<br />
<h3>
Fault 1: Permission denied: '/etc/salt/pki/master/ssh'</h3>
<br />
Try running salt-ssh on the local machine as root <br />
<br />
<br />
<h3>
Fault 2: Tabs in roster file</h3>
<br />
Although roster file does not have a file extension indicating it is Yaml, it is parsed as Yaml by Salt<br />
<br />
Remove any tabs<br />
<br />
<br />
<h3>
Fault 3: missing /etc/salt/pki/master/ssh/salt-ssh.rsa </h3>
<br />
Until you have run salt-ssh as root,<br />
the necessary files in /etc/salt/pki/master/ssh will not be generated<br />
<br />
Run as root on local machine to initialise<br />
<br />
<br />
<h3>
Fault 4: remote host has not got salt-ssh.rsa.pub in its authorized_keys</h3>
<br />
<pre>/usr/bin/ssh-copy-id -i /etc/salt/pki/master/ssh/salt-ssh.rsa.pub someuser@box</pre>
<br />
<br />
<h3>
Fault 5: /usr/bin/ssh-copy-id: ERROR: No identities found</h3>
<br />
You are probably trying to copy the salt-ssh private key (denied) rather than the public key (likely 644 permission)<br />
<br />
<h3>
Fault 6: IOErrors reported for remote host for directories in following list:</h3>
<ul>
<li>/etc/salt</li>
<li>/var/cache/salt</li>
<li>/var/log/salt</li>
</ul>
roster file for the unprivileged user should be changed to sudo: True<br />
When the connection at the remote end is instructed to use sudo (as shown above) then those 3 directories will be initiated properly on the remote host<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn695hBtlGlLZFnvufBH__qP1__ALDMXNqGW2irdZeBNoGniE4aeOhOJ58qVi2i0HtScuCUI44HPJVkPwlRPLWF6f8fUcXcJz7jdkzJc4bUSOr3PIPB1oNR1GsgPQ7uRk1qLtvRronBdM/s1600/salt-ssh_remote_dirs__20151003TAZ.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="131" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn695hBtlGlLZFnvufBH__qP1__ALDMXNqGW2irdZeBNoGniE4aeOhOJ58qVi2i0HtScuCUI44HPJVkPwlRPLWF6f8fUcXcJz7jdkzJc4bUSOr3PIPB1oNR1GsgPQ7uRk1qLtvRronBdM/s640/salt-ssh_remote_dirs__20151003TAZ.jpeg" width="640" /></a></div>
<br />
<br />
<h3>
Fault 7: [CRITICAL] Unable to import msgpack or msgpack_pure python modules</h3>
<br />
This error message is often associated with IOError described in Fault 6. Once the remote directories are created and there are no more reports of IOError, then this import message should also disappear<br />
<br />
<br />
<br />
<h3>
Fault 8: unprivileged user on remote does not have enough sudo powers</h3>
<br />
<pre>%saltpepper ALL=NOPASSWD:ALL</pre>
<br />
And then add the unprivileged user to group saltpepper (or whatever you preferred group for controlling sudo is)<br />
<br />
<br />
<h3>
Example of invoking file.find on remote host via salt-ssh</h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilMzk_EIAiHIl1LxS8KoAAwdTYEDZEOguIGt1m_6QLKOrO8aC6YoWFYdPcCZzDg5Ygg5-lmasDzJEf0ak9pJLeXUpof7VJbiOSN9uNbpVmUeassW43fmu__t2YRe5T-5z0xC07YoeCxM8/s1600/salt-ssh_file_find_var_log__20151003TAZ.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilMzk_EIAiHIl1LxS8KoAAwdTYEDZEOguIGt1m_6QLKOrO8aC6YoWFYdPcCZzDg5Ygg5-lmasDzJEf0ak9pJLeXUpof7VJbiOSN9uNbpVmUeassW43fmu__t2YRe5T-5z0xC07YoeCxM8/s640/salt-ssh_file_find_var_log__20151003TAZ.jpeg" width="640" /></a></div>
<br />
<br />
<br />
( This article is not a general guide to Saltstack. Please comment or
pingback by all means, but only comments directly related to <b>salt-ssh</b> will be read or published. )Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-16884463145505847232013-03-19T13:21:00.000+00:002013-03-19T13:21:10.778+00:00Muesli - eating it wrong and mineralsIs it possible to eat Muesli in a wrong way? YES<br />
<br />
Before explaining why (see last paragraph) it is worth providing a bit of background.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJFgqY7BMWPYECGqrvRuECaS1pOORJLhzMLeea7b4EZWtMgDhpWioTE8wuO983iOGBEi2mUpqe1AHjP7jwTjhfPlsC3lQT3HrVQjnfi0WjqKrxZ3FboJ6VvqG_Ccf3CqTXdD1w_D6aw-4/s1600/muesliSains.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJFgqY7BMWPYECGqrvRuECaS1pOORJLhzMLeea7b4EZWtMgDhpWioTE8wuO983iOGBEi2mUpqe1AHjP7jwTjhfPlsC3lQT3HrVQjnfi0WjqKrxZ3FboJ6VvqG_Ccf3CqTXdD1w_D6aw-4/s1600/muesliSains.jpeg" /></a></div>
<br />
<br />
<br />
<br />
Above is the ingredients for a supermarket muesli / granola<br />
<br />
Most supermarkets do an own brand version and all will contain oats.<br />
<br />
Now to get to the point: GRAINS NEED SOAKING<br />
<br />
<br />
<b>Mineral absorption and grain misuse:</b><br />
<br />
This could turn into a comedy article about 'grain abusers', but there is a serious side it :)<br />
<br />
Vegetarians learn through chatting to others, and reading vegetarian eating guides, that not all plant derived food is good for immediate consumption.<br />
<br />
Some require careful preparation or SOAKING.<br />
<br />
How long should I soak Muesli for before eating?<br />
Choose ten / twenty / thirty minutes depending on your hurry.<br />
<br />
Even soaking in milk for ten minutes, will have given the fibre rich grains a chance to start breaking down.<br />
<br />
Morning routine for ideal 30 minutes soaking:<br />
<br />
<ul>
<li>Up and into kitchen</li>
<li>Whilst putting the kettle / toaster on, put your muesli in the bowl and add milk</li>
<li>Shower / wash / prepare as usual</li>
<li>Eat your Muesli before leaving for the commute.</li>
</ul>
<br />
<b>What happens if I don't soak grains:</b><br />
<br />
Eating unsoaked grains regularly, may have a small effect on your ability to absorb minerals - specifically calcium, copper, iron, and zinc.<br />
<br />
<br />
<b>Is it better to eat wholegrain or rolled grains?</b><br />
<br />
If you are really worried about phytic acid, or an adverse affect on your mineral consumption, then I would suggest <a href="http://gnubyexample.blogspot.com/2011/06/natural-muesli-wholegrain-using-your.html" target="_blank">making your own muesli</a> with rolled oats and some wholegrains.<br />
<br />
Also try and soak for the full 30 minutes rather than the 'busy person' 10 minutes suggested above.<br />
<br />
By using rolled oats but including some additional wholegrains, you are making the breaking down process a bit easier, but still keeping some of the wholegrain goodness.<br />
<br />
<br />
<br />
<b>Scare stories, 'the breakfast industry', and taking things to far:</b><br />
<br />
The breakfast industry - think expensive sugary cereals, will jump on scientific articles that hint at natural products having some adverse effect. Do your own objective reading.<br />
<br />
Taking things too far. As with all things in life apply common sense to what you read.<br />
<br />
I could soak my Muesli at 5pm the night before, or set up a grain soaking facility in my shed. Neither of these things will I do, as my choice is to make some effort, but weigh up how Muesli can fit sensibly into my lifestyle.<br />
<br />
In the true spirit of critical thinking I include a few links to articles by others, who may have different opinions / suggestions, or advocate even more rigor in preparation:<br />
<ul>
<li><a href="http://www.happybellies.net/the-essentials/the-importance-of-soaking-grains/">The Importance Of Soaking Grains [ happybellies.net ]</a> </li>
<li><a href="http://www.wikipedia.org/wiki/Antinutrient">Anti-nutrients</a></li>
<li><a href="http://www.bris.ac.uk/news/2002/alspaclowfat.htm">No evidence of 'muesli-belt malnutrition' in British Toddlers</a> [ Bristol University ]</li>
</ul>
<br />
<b>The 'own brand' Muesli (Sainsbury) - additional notes:</b><br />
<br />
That ingredients breakdown at the start of the article is for Sainsbury's own.<br />
<br />
Adding together to get the often quoted figure we do 38+37+11 gives the advertising headline "86% wholegrain" for that Sainsbury's muesli.<br /><br />Where is the missing 8%? So we have 86% + 5% + 1% which gives 92%. I'm guessing that whey makes up a good portion of the missing 8%.<br /><br />Does seem an oversight to bother mentioning Hazelnuts at 1% but to forget to itemise, some of the larger quantities in the mystery 8%.<br />
<br />
Nutritional breakdown:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz6lz-kaQb7P9L4ijqx8EG1fFjbTrX9jZglYXte6a28oBbworVFWvOLbxmuv21NW9NsMOegDRyvlOZO9ohCKQENVMmNFNCXIL0cERYgvQgViN_gfV9R4VLxdGjrKlU23dRa9hkQK3r97k/s1600/muesliSainsNutritional.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz6lz-kaQb7P9L4ijqx8EG1fFjbTrX9jZglYXte6a28oBbworVFWvOLbxmuv21NW9NsMOegDRyvlOZO9ohCKQENVMmNFNCXIL0cERYgvQgViN_gfV9R4VLxdGjrKlU23dRa9hkQK3r97k/s1600/muesliSainsNutritional.jpeg" /></a></div>
<br />
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-54164728943260359292013-03-02T17:10:00.000+00:002013-03-02T17:10:19.341+00:00~/Templates (XDG) - Xfce and Thunar Thunar is the default file manager in Xfce<br />
<br />
One feature which some Linux users find useful, is support of Templates, so that right click 'New Document' has some useful options.<br />
<br />
Whilst this is not a core feature of a file manager, it is supported and here is how:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqlPpn6SQ2mMsyAQEfvld0g0BaEOHcP9Jwk7VLTsOut5LY13AZWjPc-_CgDnN72dS7gGT03v2T80x_5y3c47PLhFn1uXQjQZod086BZS55h8Cgegjsxn3QGnCXFT9zCxG8VLr7d6z6ots/s1600/thunarRecommendsXdg-user-dirs__2013Q1.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqlPpn6SQ2mMsyAQEfvld0g0BaEOHcP9Jwk7VLTsOut5LY13AZWjPc-_CgDnN72dS7gGT03v2T80x_5y3c47PLhFn1uXQjQZod086BZS55h8Cgegjsxn3QGnCXFT9zCxG8VLr7d6z6ots/s1600/thunarRecommendsXdg-user-dirs__2013Q1.jpeg" /></a></div>
<br />
<code><span style="font-size: large;">apt-get install xdg-user-dirs</span></code><br />
<br />
which brings in a binary named <b><span style="font-size: large;"><code>xdg-user-dirs-update</code></span></b> - used to autogenerate the file <span style="font-size: large;"><code>.config/user-dirs.dirs</code></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5MZq-4x90sdoOziNuZ5vX8_68f8myoBiuTovcT9199JccDPBbRjdSkcAZlTajSUGa5i9KGjMJPdW47-Ud2Vc-wJzsKgKhHKy5PV4eSmWXYGn7eIrrj-TvktmVsgaChMu6tdVuhrv_fHA/s1600/thunarXdg-user-dirs__2013Q1autogenerated.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5MZq-4x90sdoOziNuZ5vX8_68f8myoBiuTovcT9199JccDPBbRjdSkcAZlTajSUGa5i9KGjMJPdW47-Ud2Vc-wJzsKgKhHKy5PV4eSmWXYGn7eIrrj-TvktmVsgaChMu6tdVuhrv_fHA/s1600/thunarXdg-user-dirs__2013Q1autogenerated.jpeg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
And now easy to check that the correct Templates entry appears:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3bZVBK3tMCoHbcMUz4Yv2QpX1SeumUQ2FRkIDR98WnYe_HEIOjs0EwkQ4DKD7Cu7bzSgrfGKiWmU_qA6XKUf6ABchjyrlH37ue30pB2ORvxR7sR6bj9M9Pe6A0QsPukAi95QCOTPjJJ4/s1600/thunarXdg-user-dirs__2013Q1containsTemplates.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3bZVBK3tMCoHbcMUz4Yv2QpX1SeumUQ2FRkIDR98WnYe_HEIOjs0EwkQ4DKD7Cu7bzSgrfGKiWmU_qA6XKUf6ABchjyrlH37ue30pB2ORvxR7sR6bj9M9Pe6A0QsPukAi95QCOTPjJJ4/s1600/thunarXdg-user-dirs__2013Q1containsTemplates.jpeg" /></a></div>
<br />
<br />
<h4>
Firefox Downloads, other downloads and XDG:</h4>
<br />
If you find that your Downloads are not being saved to the correct place, then the described solution of generating the file <span style="font-size: large;"><code>.config/user-dirs.dirs</code></span> may solve this download problem also.<br />
<br />
If you want browser downloads saved somewhere else in Xfce, then you might try editing the line XDG_DOWNLOAD_DIR shown in the screenshot above.<br />
<br />
<h4>
Notes and Further Reading:</h4>
<ul>
<li><a href="http://docs.xfce.org/xfce/thunar/faq" target="_blank">Thunar FAQ</a> at Xfce.org </li>
<li><a href="http://docs.xfce.org/xfce/thunar/faq#why_doesn_t_thunar_execute_files_marked_as_executable" target="_blank">Security Features of Thunar</a> including no execute</li>
<li><a href="https://bugzilla.xfce.org/describecomponents.cgi?product=Thunar" target="_blank">Bugzilla</a> for reading up on known 'features' and Thunar bugs</li>
</ul>
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-79209662711022811442012-12-19T13:15:00.000+00:002012-12-19T13:15:25.535+00:00Ubuntu drum roll - silence or be damned!This post relates to Ubuntu 12.04 lts (Precise) and newer only.<br />
<br />
There are plenty of forum posts and conflicting advice out there, but here is what works:<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtdhCeYsn5gFDv1aaqW0FtctzSqnNTwJyVTDjYYxTM-mV-BPveWuzlaxzcjZV6iiNCU42jzFAF1ZIn4zh7xlYCdwlsqgeTjqGkQZAADmbTKR6585yH3J0FiBjg047pwetvCGDxvZIH6tQ/s1600/usr_share_sounds_ubuntu_stereo__2012Q4after.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtdhCeYsn5gFDv1aaqW0FtctzSqnNTwJyVTDjYYxTM-mV-BPveWuzlaxzcjZV6iiNCU42jzFAF1ZIn4zh7xlYCdwlsqgeTjqGkQZAADmbTKR6585yH3J0FiBjg047pwetvCGDxvZIH6tQ/s1600/usr_share_sounds_ubuntu_stereo__2012Q4after.jpeg" /></a></div>
<br />
<h3>
Commands to type:</h3>
<pre><span style="font-size: large;">cd /usr/share/sounds/ubuntu/stereo/</span></pre>
<pre><span style="font-size: large;"> </span></pre>
<pre><span style="font-size: large;">sudo mv system-ready.ogg system-ready.ogg.disabled</span></pre>
<br />
<br />
Shown as a screenshot here:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDP02pHYyID5goZlsqA9cKp9JXFZk5qQ-DVxQhrTFucyRjO_RVVEQNmds0tHOGAI955D7Z0Yzm46ZiRYat4y3vwB8IaCnVvrdUIFhQ5vEMaZNKGfCAYLCw8s8GvAZmaRVCi-eymOtWdHA/s1600/usr_share_sounds_ubuntu_stereo__2012Q4actions.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDP02pHYyID5goZlsqA9cKp9JXFZk5qQ-DVxQhrTFucyRjO_RVVEQNmds0tHOGAI955D7Z0Yzm46ZiRYat4y3vwB8IaCnVvrdUIFhQ5vEMaZNKGfCAYLCw8s8GvAZmaRVCi-eymOtWdHA/s1600/usr_share_sounds_ubuntu_stereo__2012Q4actions.jpeg" /></a></div>
<br />
Now restart your computer, and check the login screen, no longer gives a drum roll.<br />
<br />
<h3>
Before the change - how did everything look (default):</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZwlloPVszAeyr-jWrqdOk2hS71nij5hQwp6Bh4PoCwmvW62sMqYLWnQpuLML8Ylt1z8hC0Rqra09cBhNGrip2Wj6DV4pVadwVXme_mYKuHjYZvNBgnMmb9HKXTpDKyqQhjl2hpqB9bx0/s1600/usr_share_sounds_ubuntu_stereo__2012Q4before.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZwlloPVszAeyr-jWrqdOk2hS71nij5hQwp6Bh4PoCwmvW62sMqYLWnQpuLML8Ylt1z8hC0Rqra09cBhNGrip2Wj6DV4pVadwVXme_mYKuHjYZvNBgnMmb9HKXTpDKyqQhjl2hpqB9bx0/s1600/usr_share_sounds_ubuntu_stereo__2012Q4before.jpeg" /></a></div>
<br />
<br />
<h3>
Recap - describing what I did:</h3>
<br />
The drum roll when the greeter screen (lightdm) is first displayed, is the system file <span style="font-size: large;"><code>system-ready.ogg</code></span><br />
<br />
That file <span style="font-size: large;"><code>system-ready.ogg</code></span> is a symbolic link to the actual sound file <span style="font-size: large;"><code>dialog-question.ogg</code></span><br />
<br />
By moving system-ready.ogg to new name system-ready.ogg.disabled,<br />
the Ubuntu system is unable to find what it has looked for, and you get what you want - silence!<br />
<br />
No more drum roll every time the Ubuntu login screen is displayed.<br />
<br />
<br />
<h3>
Previous versions of Ubuntu and Gnome:</h3>
Ubuntu 11 and earlier did have a more Graphical and user friendly way of disabling the login drum roll.<br />
<br />
There are plenty of forum posts about that.<br />
<br />
To clarify: Advice that works for 12.04 lts will be different to advice that works for Ubuntu 11 or Ubuntu 10<br />
<br />
<br />Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-58476507985547749562012-11-12T11:40:00.000+00:002013-07-12T11:06:30.119+01:00Clone at revision - Git and MercurialThis is possible in both Git and Mercurial, although one seems a bit more involved.<br />
<br />
<h3>
Git - clone THEN reset or checkout:</h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO2QgAylyAQE3hamaGB4TLkAuVICGhJtp36HpE-T0748mv4Z-549HAM1_oUh5GbD2MUKeQwAKmYFdOR4llbkkiSVfA5_-A03StDaVlhkVmCROxh5zBr6vugoQDqHQX7F3j4n8Dg1zYJRc/s1600/git_clone_then_revision_by_reset__2012Q4mucky.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO2QgAylyAQE3hamaGB4TLkAuVICGhJtp36HpE-T0748mv4Z-549HAM1_oUh5GbD2MUKeQwAKmYFdOR4llbkkiSVfA5_-A03StDaVlhkVmCROxh5zBr6vugoQDqHQX7F3j4n8Dg1zYJRc/s640/git_clone_then_revision_by_reset__2012Q4mucky.jpeg" width="640" /></a></div>
<br />
<div style="text-align: right;">
( full clone then: <code>git reset --hard 754bda21cbc5c9044daf7f968fb9b4ffae39e334</code> )</div>
<br />
<h3>
Mercurial - just do it:</h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje_tRcRWmC3ZRiVUTp769WBhFAyctxjUVWAXjkkAHaVPzncGAGlJFVFxENC16POwz2FEul4JVh53yNvI09SjsEEFWcLRkSu7L7cmdwcm-dZVqEg-7cr26oTc9ybB7IKj1eNhqw2zL29zE/s1600/mercurial_clone_at_revision__2012Q4easy.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje_tRcRWmC3ZRiVUTp769WBhFAyctxjUVWAXjkkAHaVPzncGAGlJFVFxENC16POwz2FEul4JVh53yNvI09SjsEEFWcLRkSu7L7cmdwcm-dZVqEg-7cr26oTc9ybB7IKj1eNhqw2zL29zE/s640/mercurial_clone_at_revision__2012Q4easy.jpeg" width="640" /></a></div>
<br />
( <code>hg clone -r 34dea6ddb0b927dc223c8cdbab4314a3aac355a7 https://bitbucket.org/wrightsolutions/local-bin</code> )<br />
<br />
In the screenshot above, I have cloned as described, and then removed the repo and done a full clone.<br />
By doing this I hoped to illustrate the key difference in changeset counts:<br />
<ul>
<li>'clone at revision' gave 77 changesets with 99 changes to 83 files </li>
<li>full clone gave 79 changesets with 101 changes to 84 files</li>
</ul>
That should satisfy you that the 'clone at revision' really does what it suggests. <br />
<br />
<br />
Next I give a signature style explanation of the 'clone at revision' command<br />
<br />
<pre>hg clone -r <sha1> source_repo</pre>
<br />
<h3>
Notes and Further Reading:</h3>
But, but, but with Git you can just create an empty git and then<br />
<br />
<pre><code>git remote add origin https://github.com/jquery/jquery.git</code></pre>
<code>git fetch origin 754bda21cbc5c9044daf7f968fb9b4ffae39e334</code>
<br />
<br />
Try it and you might just see the Git complaint...<br />
'fatal: reference is not a tree: 754bda21cbc5c9044daf7f968fb9b4ffae39e334'<br />
<br />
Another nicety of Mercurial is that you can use shortened references (just the first 7 characters) and in most cases that will get you what you want.<br />
<br />
Seven character abbreviation example:<br />
<code> hg clone -r 34dea6d https://bitbucket.org/wrightsolutions/local-bin</code> <br />
( rather than the full 40 character reference used in the example above )<br />
<br />
Note: Where you have a huge repository like say <a href="http://hg.sagemath.org/sage-main/commits/all" target="_blank">sagemath</a> which has 100 active committers, then you might want to use the full 40 character reference to be sure of requesting the right revision<br />
<br />
<br />
<br />
There is <a href="http://wiki.openoffice.org/wiki/Mercurial/Tips_And_Tricks" target="_blank">an excellent Mercurial Hints and Tips page</a> at OpenOffice.org <br />
<br />
See hg.sagemath.org for current Sagemath repository.<br />
Most contributions are currently handled by registered lists I think, but if you have taken the time to really understand the code, then there is place for <a href="http://hg.sagemath.org/sage-main/pull-requests" rel="nofollow" target="_blank">pull requests</a> also.<br />
<br />
<br />Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-19187496542176762522011-11-02T13:11:00.000+00:002011-11-02T13:11:28.201+00:00linux is lateral - uk corridorLinux use in UK companies, clustered on M62 and M4?<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy2gYrkLqWy-l7sAXahp92rjKwklCPg-yjULdlZl92d-pvKNs30VzD6EwKiFUQGkGL6Bs0mK1gnz4uKBURaKdpTzOaQIniLksHsU1b5BXOYVWL8KYBCjjUp3gp4Tp_2cs1zAj3D8yCBww/s1600/linuxIsLateral__2011Q4uk.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy2gYrkLqWy-l7sAXahp92rjKwklCPg-yjULdlZl92d-pvKNs30VzD6EwKiFUQGkGL6Bs0mK1gnz4uKBURaKdpTzOaQIniLksHsU1b5BXOYVWL8KYBCjjUp3gp4Tp_2cs1zAj3D8yCBww/s1600/linuxIsLateral__2011Q4uk.jpeg" /> </a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Apart from stating the obvious (Central London) where big financial is regularly advertising for Linux, the two corridors stand out.</div><div class="separator" style="clear: both; text-align: left;"> </div><div class="separator" style="clear: both; text-align: left;">Between Warrington and Leeds the M62. With a particular focus on Manchester.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">The M4 corridor, not that it is news to see this area mentioned for startups.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Cardiff and Bristol - a nice tech cluster going on there either side of the River Severn.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><b>Developments in 2012 and 2013:</b></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">The Silicon roundabout and other initiatives should help Linux move further east of Central London. At the moment skills are concentrated in Central London and other parts of London, but not much in East London.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;">( Middlesex and/or the stretch Left of Central London between M1 and M4, has always traditionally been a tech hotspot also ) </span></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">The Silicon roundabout will stretch the reach of Linux a little further along that southern corridor, but what about the Midlands and North?</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Tech startup success in Warrington, Manchester, and Leeds should spur on the extremes (Liverpool and Hull) to eventually play catch up.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Birmingham is underrepresented, and I will keep watching the news for any development there.</div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><b>Linux and Tech Startups:</b></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Take the map above and overlay it onto a map of startup clusters. What do you see?</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Note: That map at the top is a point in time analysis, and will change month to month, however I suspect the picture will look broadly the same until those initiatives mentioned above take off.</div>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-53528708875618177212011-10-21T13:08:00.002+01:002011-12-11T14:24:32.187+00:00Birmingham - city visitHaving never visited Birmingham except for business, i took the opportunity for a short two day hotel stay as a leisure visitor.<br />
<br />
<br />
<b>First impressions of this Pedestrian visitor to Birmingham, UK:</b><br />
<br />
There is a lot to it. Do have satnav enabled on your phone if you plan to go walkabout.<br />
<br />
If you are planning a shopping trip, then your activities are already laid out in the several great shopping areas in the city centre. No satnav required.<br />
<div style="text-align: center;"><span style="font-size: x-small;">(If you are going purely for a shopping day, then you can probably ignore the rest of this section) </span></div><br />
One of the things that attracts medium sized and large businesses to Birmingham is the excellent road network.<br />
<br />
Unlike Leeds though, Birmingham have yet to reconfigure the inner ring roads and connecting arteries to suit current needs of traffic / pedestrian mix.<br />
<br />
The car is king in Birmingham, and being on foot feels a bit like visiting London used to feel, before the congestion charging move.<br />
<br />
There are expanses of paved area where shoppers are somewhat shielded from king car, however these are not well connected enough to complete the impression.<br />
<br />
Having lived in Leeds for a decade, and witnessed the gradual change in the inner ring road & one way systems, I now understand why those changes were required.<br />
<br />
Proactive traffic planning and a decade of staggered disruption is what Birmingham will have to endure to create the pedestrian / traffic complimentary mix which Leeds have succeeded in providing.<br />
<br />
Alternatively the London model (congestion charging) and moving the arteries away from the centre, through charges, might be another alternative.<br />
<br />
Now the '<a href="http://www.wikipedia.org/wiki/Big_City_Plan">Big City Plan</a>' is Birmingham's answer to my comment above.<br />
<blockquote>It also sets out visionary proposals in which each of the seven 'quarters' will be able to evolve.</blockquote>The developments of New Street Station, the Library and Museum & Art Gallery (most of which complete in 2014 / 2015) will be a big step forward.<br />
<br />
However the connectivity of those seven areas and, more importantly, creating one way systems or other ways of pushing the high speed traffic out, from the very centre, need to be addressed (my humble opinion).<br />
<br />
<br />
<br />
<b>Art and Birmingham - Wow!</b><br />
<br />
Pleasantly surprised to find the central Art locations so well stocked.<br />
<br />
The Museum and Art Gallery has some fantastic works, however the layout of the listed building in which it is housed, does the visitor few favours.<br />
<br />
I challenge any couple to spend a few hours in the main Museum & Art Gallery and rely on just signage for directions.<br />
<br />
When the renovation work is complete in 2015, I do intend to visit again. Part of me hopes that the signs will have improved, and that the lack of renovation work makes the difference in visitor experience. <br />
<br />
Do visit. The range and total number of items on display is fantastic.<br />
<br />
<br />
<b>Culture and Birmingham - just dipping a toe:</b><br />
<br />
It is impossible to understand the culture of a city in a couple of days, so I will not try. Do treat my comments lightly - they are not thoroughly researched and are really just some minor observations.<br />
<br />
If you like a Cultural mix (I do) then you will feel right at home in Birmingham, it is a melting pot of cultures and friendly with it.<br />
<br />
Whilst I am sure reading the local press I might find some examples of when this mix does not work, it certainly wasn't my impression, during my short visit, that this was the case.<br />
<br />
Travel on a bus. Yes there are some groups of folks in two or threes chatting about aspects of their shared culture. But that never seemed to create a feeling of division. My impression was that it was just 60 people from Birmingham on a bus, with more in common, than otherwise.<br />
<br />
If you live in an area that is uni-culture, then do visit Birmingham and see for yourself. But do so with the intention of being open and receptive. Otherwise why bother wasting your own time, and the time of the good folks of Birmingham.<br />
<br />
<br />
<b>Real Ale and Ska - now there is a potent combination:</b><br />
<br />
I cannot think of a better activity than having a few pints in friendly company, whilst listening to some good jukebox music.<br />
<br />
In Selly Oak, I followed my visit to the <a href="http://www.barber.org.uk/">Barber Art Institute</a>, with a few pints of <a href="http://www.bankssbeer.co.uk/banks-fresh.html">Banks</a> and some relaxed Reggae and Ska on the jukebox.<br />
<br />
<br />
<b>Notes and Further Reading:</b><br />
<br />
<br />
Did I enjoy my 2 night city break in Birmingham? Yes.<br />
Would I visit again? I will.<br />
<br />
If you are visiting and the weather is good, then do explore the tourist trail near the canal - sun bouncing off the water will give you a good dose of Vit D.<br />
<br />
<blockquote>You need the sun's ultraviolet B rays to manufacture vitamin D.</blockquote><br />
I try not to get too hung up on musical categories, but here are two links, if your interest takes you further:<br />
<br />
<ul><li><a href="http://www.wikipedia.org/wiki/Ska">Ska</a> [ wikipedia ]</li>
<li><a href="http://www.wikipedia.org/wiki/Rocksteady">Rocksteady</a> [ wikipedia ]</li>
</ul>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-58495519999943542002011-09-11T14:05:00.000+01:002011-09-11T14:05:15.076+01:00google API - command line access to googledocsEach google service has an API.<br />
<br />
These APIs change regularly as google develops it's services, however the core activities should always work.<br />
<br />
If you want to take advantage of the latest features, then the API might well be developing as I write this. However things like 'Uploading a pdf' should work and be stable ... or so I thought.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRUBwJC9eobmo_PZhBg-k32-K5KIJJjfP53zVAjTAVOWiRpvyP3w8QtcCkbDuPLHN1vKnixRwl2HTeaVfmfUN_NEaNg1VtxMdqEpsnKotoVBC7TaRKlFpXU-nTmVSeRicMsilWRg9Qg_c/s1600/googleCLI__201109pdfUploadViaGoogledocsAPIfail.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRUBwJC9eobmo_PZhBg-k32-K5KIJJjfP53zVAjTAVOWiRpvyP3w8QtcCkbDuPLHN1vKnixRwl2HTeaVfmfUN_NEaNg1VtxMdqEpsnKotoVBC7TaRKlFpXU-nTmVSeRicMsilWRg9Qg_c/s1600/googleCLI__201109pdfUploadViaGoogledocsAPIfail.jpeg" /></a></div><br />
I repeat the text below for easy copy/paste for future web searching:<br />
<br />
<pre>Loading ./cal_man_EL531_509refBySharp.pdf
Failed to upload ./cal_man_EL531_509refBySharp.pdf: {'status': 415, </pre><pre>'body': 'Content-Type application/pdf is not a valid input type.',</pre><pre>'reason': 'Unsupported Media Type'}</pre><br />
Other types of file might work fine, however the lack of .pdf upload facility from command line, was enough to halt my experiment.<br />
<br />
On Debian GNU/Linux the following install will help get you started:<br />
<br />
<pre><span style="font-size: large;">apt-get install python-gdata googlecl</span></pre>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-15698243157750523012011-08-21T17:07:00.000+01:002011-08-21T17:07:45.337+01:00protecting a section / paragraph in a documentHere are the two ways which I protect portions of a document:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvSHDvBuJdKQlQ0hMQyA-j14Aka9Ii7wVWOmfF8Yz73xifsGoxBcEuIe273-x7qniDgpJgeMFAs1_ToUBOdAVyBEZlzzTZQ3dSctJu_o_4a0sxBZcZkQnsmEKRM1oWsJpjRM0XuGB_XCo/s1600/protectFrame__201108protectingPortionOfLibreOfficeOpenOfficeDocument.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvSHDvBuJdKQlQ0hMQyA-j14Aka9Ii7wVWOmfF8Yz73xifsGoxBcEuIe273-x7qniDgpJgeMFAs1_ToUBOdAVyBEZlzzTZQ3dSctJu_o_4a0sxBZcZkQnsmEKRM1oWsJpjRM0XuGB_XCo/s1600/protectFrame__201108protectingPortionOfLibreOfficeOpenOfficeDocument.jpeg" /></a></div> ...wanting to protect it often occurs for important content which I'll also frame (hence protecting frames)<br />
<br />
But sometimes I just want to protect a block of text to prevent accidental overtyping...<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAsXBbtn94ZgWXSJojay8XvGjnPqxIMir4yq-HWI6yU2azWvyRhrVbvZZLR5pHlITQo77coWCcImDug83Q9Qdl6zjO-u7H0tJQYwBKMi1lx-LMmS9fYm91nAakWj4C72sEfqsF4sLTpWI/s1600/protectSection__201108protectingPortionOfLibreOfficeOpenOfficeDocument.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAsXBbtn94ZgWXSJojay8XvGjnPqxIMir4yq-HWI6yU2azWvyRhrVbvZZLR5pHlITQo77coWCcImDug83Q9Qdl6zjO-u7H0tJQYwBKMi1lx-LMmS9fYm91nAakWj4C72sEfqsF4sLTpWI/s1600/protectSection__201108protectingPortionOfLibreOfficeOpenOfficeDocument.jpeg" /></a></div> Create a section, then paste in your text, and then 'protect' the section. Example...<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT4LSY9svYYjJw55vhcBve0qSj_ioWuDZi9ckguEqThOYw0jVXhpIUBQh4_7vtf3VmfkMo9xOFUeExDxGxWJ3POmrzYboKaDHmtpP3lzLWDLl5TA-tkPS8uQWrqwyxK_w6DZUyH0dJVwo/s1600/protectSectionExampleGcc__201108protectingPortionOfLibreOfficeOpenOfficeDocument.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT4LSY9svYYjJw55vhcBve0qSj_ioWuDZi9ckguEqThOYw0jVXhpIUBQh4_7vtf3VmfkMo9xOFUeExDxGxWJ3POmrzYboKaDHmtpP3lzLWDLl5TA-tkPS8uQWrqwyxK_w6DZUyH0dJVwo/s1600/protectSectionExampleGcc__201108protectingPortionOfLibreOfficeOpenOfficeDocument.jpeg" /></a></div><br />
Don't let the actual text (gcc / pthread, etc) put you off, I just wanted to show a real world example.<br />
<br />
Here I have included in my document some commands, which I will later use as reference. What I don't want to happen is to accidentally overtype some of those commands whilst editing my document, and losing the concrete reference.<br />
<br />
Frames or Sections, both will do a job for you in protecting a block of content - choose whichever you find most convenient :)<br />
<br />
<br />
<strong>Notes and Further Reading:</strong><br />
<br />
How to protect a section is discussed in Chapter 4 of the LibreOffice / OpenOffice documentation (links below)<br />
<br />
<ul><li>Chapter 4 "Formatting pages" (<a href="http://wiki.documentfoundation.org/cgi_img_auth.php/6/69/0204WG3-FormattingPages.odt">as .odt file</a>) [ wiki.documentfoundation.org ]</li>
<li>Chapter 4 "Formatting pages" (<a href="http://wiki.documentfoundation.org/cgi_img_auth.php/0/0d/0204WG3-FormattingPages.pdf">as .pdf file</a>) [ wiki.documentfoundation.org ] </li>
<li><a href="http://www.libreoffice.org/get-help/documentation/">LibreOffice documentation homepage</a> [ libreoffice.org ]</li>
</ul> Chapter 4 pdf is 1.4MB and the .odt version is much smaller.<br />
<br />
If you have LibreOffice or OpenOffice installed then you might have local copies accessed by pressing F1 (help)<br />
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-27494364865243077352011-08-08T11:05:00.000+01:002014-06-21T18:15:20.666+01:00move / resize partitions - the zero cost wayThere was a time when resizing and moving partitions required a trip to the computer store for some software.<br />
<br />
No longer the case.<br />
<br />
GNU Fdisk is a feature rich fdisk replacement that supports many options including:<br />
<br />
<ul>
<li>v - move a partition</li>
<li>c - rescue a lost partition</li>
<li>z - resize a partition</li>
<li>h - check the consistency of a partition</li>
<li>o - copy the partition over another partition</li>
</ul>
By default GNU Fdisk will work in 'compatibility mode', so as to aid users who are making the switch from traditional fdisk.<br />
<br />
So options v, c, z, h, o would not show in your menu.<br />
<br />
However the -G flag turns off the compatibility mode.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwZobwxSQhTTJ1oJnJm6ylahquFKznqVJvaGtDyXYFfxY1_G1DQPatfwVc35AjwSMQVLr6T_gJAFJejV1wwv-3FeVqkvM50xYBht7urpt8r_nJL4At8gabkDsGbZdj5-5-D3ORlj2GsDE/s1600/gnu-fdisk__201108useGflagToObtainEnhancedFeatures.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwZobwxSQhTTJ1oJnJm6ylahquFKznqVJvaGtDyXYFfxY1_G1DQPatfwVc35AjwSMQVLr6T_gJAFJejV1wwv-3FeVqkvM50xYBht7urpt8r_nJL4At8gabkDsGbZdj5-5-D3ORlj2GsDE/s1600/gnu-fdisk__201108useGflagToObtainEnhancedFeatures.jpeg" /></a></div>
<br />
By running <b>gfdisk -G /dev/sda</b> the extra options are available.<br />
<br />
<div style="text-align: center;">
<span style="font-size: x-small;">( Replace /dev/sda above with whatever your disk device identifier is )</span></div>
<br />
In Debian GNU / Linux you will find GNU Fdisk <a href="http://packages.debian.org/stable/gnu-fdisk">here</a>.<br />
<br />
If all this is too much command line, then there is gparted for a clickable alternative:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDEaFybQ55oWdW_Hj5R-HFOUJX_MQmvYe8DJRchnB0zwCbqJxExpmyUFXebhtSwMMR_zS74ZpPHumVFxITFGHf6sPkKUtZSGuxYYJbygSLGJUKbxlcxu3ziJKCQ8Rlt4icm4xCiNXyRHg/s1600/gparted_resize_example__20140621.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="gparted list and resize" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDEaFybQ55oWdW_Hj5R-HFOUJX_MQmvYe8DJRchnB0zwCbqJxExpmyUFXebhtSwMMR_zS74ZpPHumVFxITFGHf6sPkKUtZSGuxYYJbygSLGJUKbxlcxu3ziJKCQ8Rlt4icm4xCiNXyRHg/s1600/gparted_resize_example__20140621.jpeg" height="640" title="" width="488" /></a></div>
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-65357571606589980992011-07-01T16:44:00.000+01:002016-01-29T14:32:46.521+00:00sample data in postgresThis article takes some sample data and imports it into Postgresql (i) using CSV import and (ii) using INSERTs from an export of MySQL<br />
<br />
Now to get the data into postgres we could go back to the spreadsheet (csv loading approach) or maybe take a compatible export from mysql and load that (compatible loading approach)<br />
<br />
The data we will be using can be found <a href="http://static.wrightsolutions.co.uk/guide/publishedatbloggnubyexample/pubAtBlogGnubyexample__200907postgres/">here</a> and I am about to start working with <a href="http://static.wrightsolutions.co.uk/guide/publishedatbloggnubyexample/pubAtBlogGnubyexample__200907postgres/amdAM3clockSpeedsAndWattage__200907.csv">this file</a>.<br />
<br />
( If you are coming from a MySQL background and want to just load the sample 'employees' database into Postgresql, then project at <a href="https://bitbucket.org/wrightsolutions/postgres9postgres8employees" target="_blank">this link</a> will help with that ) <br />
<br />
<b>CSV loading approach:</b><br />
<br />
In postgres use <a href="http://www.postgresql.org/docs/8.3/interactive/sql-copy.html">COPY FROM</a> to get data from the filesystem into the database.<br />
<br />
But wait; surely you need to already created a table so as to have a table to load into?<br />
Yep, otherwise you would see postgres complain about a missing relation like so...<br />
<code><br />
postgres=# COPY amd_bang_per_watt FROM '/tmp/<a href="http://static.wrightsolutions.co.uk/guide/publishedatbloggnubyexample/pubAtBlogGnubyexample__200907postgres/amdAM3clockSpeedsAndWattage__200907.csv">amdAM3clockSpeedsAndWattage__200907.csv</a>' WITH CSV QUOTE AS E'\042';<br />
ERROR: relation "amd_bang_per_watt" does not exist<br />
</code><br />
<br />
The table does not exist so you need to 'create table'.<br />
<br />
I cover this in more detail in the next section 'Compatible loading approach' so either consult there or have a go yourself first perhaps.<br />
<br />
I now assume you have the table amd_bang_per_watt created.<br />
<br />
My table needed emptying first but you can likely ignore the next command:<br />
<code><br />
: #root@156ns1(~) ;echo 'delete from amd_bang_per_watt' | psql amd_power_dissipation postgres<br />
Password for user postgres:<br />
DELETE 50<br />
</code><br />
...and pick things up again here where I will try the COPY FROM:<br />
<code><br />
amd_power_dissipation=# COPY amd_bang_per_watt FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv' WITH CSV QUOTE AS E'\042';<br />
ERROR: value too long for type character varying(10)<br />
CONTEXT: COPY amd_bang_per_watt, line 1, column model_family: "Model Family"<br />
amd_power_dissipation=#<br />
</code><br />
and taking care of the header we execute<br />
<code><br />
amd_power_dissipation=# COPY amd_bang_per_watt FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv' WITH CSV HEADER QUOTE AS E'\042';<br />
ERROR: null value in column "speed_power_ratio" violates not-null constraint<br />
CONTEXT: COPY amd_bang_per_watt, line 4: ""X2 ","6??? x¹ ",2.3,,,"3.4 HT3 ",,,45,"x¹ 2009 ","<br />
amd_power_dissipation=# select count(*) from amd_bang_per_watt;<br />
count<br />
-------<br />
0<br />
(1 row)<br />
</code><br />
which is still not completing as we would wish so attempt 3:<br />
<code><br />
amd_power_dissipation=# COPY amd_bang_per_watt FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv' WITH CSV HEADER QUOTE AS E'\042' FORCE NOT NULL speed_power_ratio;<br />
ERROR: invalid input syntax for type numeric: ""<br />
CONTEXT: COPY amd_bang_per_watt, line 4, column speed_power_ratio: ""<br />
</code><br />
...attempt 4...<br />
<code><br />
amd_power_dissipation=# ;COPY amd_bang_per_watt (1,2,3,4,5,6,7,8,9,10) FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv' WITH CSV HEADER QUOTE AS E'\042';<br />
ERROR: syntax error at or near "1"<br />
LINE 1: COPY amd_bang_per_watt (1,2,3,4,5,6,7,8,9,10) FROM '/tmp/amd...<br />
</code><br />
...attempt 5...<br />
<code><br />
amd_power_dissipation=# COPY amd_bang_per_watt (model_family,model,clock_speed,l2cache,l3cache,ht_bus_ghz,voltage,socket,tdp_watts,process_comments) FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv' WITH CSV HEADER QUOTE AS E'\042';<br />
ERROR: extra data after last expected column<br />
CONTEXT: COPY amd_bang_per_watt, line 2: ""X2 II ","550 Black Edition ",3.1,"2x512k ","6MB ",2,"1.15-1.425 ","AM3 ",80,"45nm Callisto Q3-2009 ..."<br />
</code><br />
...attempt 6...<br />
<code><br />
amd_power_dissipation=# COPY amd_bang_per_watt (model_family,model,clock_speed,l2cache,l3cache,ht_bus_ghz,voltage,socket,tdp_watts,process_comments,process_comments) FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv' WITH CSV HEADER QUOTE AS E'\042';<br />
ERROR: column "process_comments" specified more than once<br />
</code><br />
...and still no success so back to the drawing board (or rather <a href="http://www.gnu.org/software/sed/manual/sed.html">sed</a> in fact):<br />
<code><br />
sed 's/\,$/\,0/' <> amdAM3clockSpeedsAndWattage__200907.csv-truncated<br />
: #root@156ns1(tmp) ;sed 's/\,$/\,0/' <> amdAM3clockSpeedsAndWattage__200907.csv-edited<br />
: #root@156ns1(tmp) ;sed 's/\,\,\,/\,0\,\,/' <> amdAM3clockSpeedsAndWattage__200907.csv-edited2<br />
</code><br />
Here is some dialogue to explain how I came to have three sed commands of which the first is now redundant:<br />
<code><br />
amd_power_dissipation=# COPY amd_bang_per_watt FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv-truncated' WITH CSV HEADER QUOTE AS E'\042';<br />
ERROR: missing data for column "speed_power_ratio"<br />
CONTEXT: COPY amd_bang_per_watt, line 4: ""X2 ","6??? x¹ ",2.3,,,"3.4 HT3 ",,,45,"x¹ 2009 ""<br />
amd_power_dissipation=# COPY amd_bang_per_watt FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv-edited' WITH CSV HEADER QUOTE AS E'\042';<br />
ERROR: null value in column "clock_speed" violates not-null constraint<br />
CONTEXT: COPY amd_bang_per_watt, line 10: ""X2 ","6??? x¹ ",,,"2MB ","DDR2 ",,,,"x¹ 65nm Kuma Q2/2008 ",0"<br />
amd_power_dissipation=# COPY amd_bang_per_watt FROM '/tmp/amdAM3clockSpeedsAndWattage__200907.csv-edited2' WITH CSV HEADER QUOTE AS E'\042';<br />
COPY 50<br />
</code><br />
and now a few selects to check things look okay:<br />
<code><br />
amd_power_dissipation=# select count(*) from amd_bang_per_watt;<br />
count<br />
-------<br />
50<br />
(1 row)<br />
<br />
amd_power_dissipation=# select count(*),substr(process_comments,1,4) as nm from amd_bang_per_watt group by nm;<br />
count | nm<br />
-------+------<br />
2 | x¹<br />
3 | x¹ Q<br />
1 | x¹ 4<br />
6 | x¹ 2<br />
19 | 65nm<br />
15 | 45nm<br />
4 | x¹ 6<br />
(7 rows)<br />
</code><br />
All looks well here.<br />
<br />
The CSV files (original, and edited using <a href="http://www.wikipedia.org/wiki/Sed">sed</a>) are listed below:<br />
<ul>
<li><a href="http://static.wrightsolutions.co.uk/guide/publishedatbloggnubyexample/pubAtBlogGnubyexample__200907postgres/amdAM3clockSpeedsAndWattage__200907.csv">amdAM3clockSpeedsAndWattage__200907.csv</a></li>
<li><a href="http://static.wrightsolutions.co.uk/guide/publishedatbloggnubyexample/pubAtBlogGnubyexample__200907postgres/amdAM3clockSpeedsAndWattage__200907.csv-edited.utf8">amdAM3clockSpeedsAndWattage__200907.csv-edited.utf8</a></li>
<li><a href="http://static.wrightsolutions.co.uk/guide/publishedatbloggnubyexample/pubAtBlogGnubyexample__200907postgres/amdAM3clockSpeedsAndWattage__200907.csv-edited2.utf8">amdAM3clockSpeedsAndWattage__200907.csv-edited2.utf8</a><br />
</li>
</ul>
If recommend saving the above files to your filesystem and viewing them from there, however if you do instead open them directly in your browser and you see x¹ rather than x¹ then try using <a href="http://www.wikipedia.org/wiki/Konqueror">Konqueror</a> instead.<br />
<br />
Konqueror is a clickable install on most Linux desktop distributions and is available to Windows users via <a href="http://windows.kde.org/">KDE on Windows project</a>.<br />
<br />
<br />
<b>Compatible loading approach:</b><br />
<br />
Here is an extract of some <a href="http://github.com/maxlapshin/mysql2postgres/blob/5df2e7a1255f40b4b5405c8ca0de60d38ceffb74/mysql2psql">ruby code</a> which <a href="http://github.com/maxlapshin/mysql2postgres/tree">I looked up</a>, so as I have an idea of what <a href="http://dev.mysql.com/doc/refman/5.0/en/data-types.html">mysql types</a> map to what <a href="http://www.postgresql.org/docs/8.3/static/datatype.html">postgres types</a>:<br />
<br />
<pre>def convert_type(type)
case type
when "tinyint(1)"
"boolean"
when /tinyint/
"tinyint"
when /int/
"integer"
when /varchar/
"varchar"
when /decimal/
"decimal"
else
type
end
end</pre>
You might find a more accessible read in the form of the <a href="http://www.markslade.name/">Mark Slade</a> <a href="http://www.markslade.name/Articles.html?a=9">migration guide</a> for mysql to postgres. That guide includes some discussion about datatype mappings.<br />
<br />
What I wanted to check was that decimal in mysql would mean decimal in postgres, and, yes it seems that it does.<br />
<br />
One recommendation for using decimal fields in any database is to always specify both parameters rather than relying on database defaults.<br />
That way if you do end up exporting/importing as part of some migration, then you will not be tripped up by differing defaults for precision.<br />
<br />
Now in <a href="http://gnubyexample.blogspot.com/2009/07/sample-data-for-import-and-xml-export_21.html">part 3</a> of the <a href="http://gnubyexample.blogspot.com/search?q=mysql+sample+amd_bang_per_watt">'sample data and mysql</a>' postings I used --compatible=postgresql flag to produce these files:<br />
<ul>
<li><a href="http://docs.google.com/Doc?docid=0AZAp7BMj218VZGZneGtmbmpfMThkOWI0Y2RoZw&hl=en_GB">amd_bang_per_watt.mysqldump4postgresSansCreate</a><br />
</li>
<li>[ -^- data only (no create statement) using --skip-opt --no-create-info --compatible=postgresql ]</li>
<li><a href="http://docs.google.com/Doc?docid=0AZAp7BMj218VZGZneGtmbmpfMTlmcHp2NDZjOA&hl=en_GB">amd_bang_per_watt.mysqldump4postgresSansOpts</a><br />
</li>
<li>[ -^- data+create (less compact form) using --skip-opt --compatible=postgresql ]<br />
</li>
<li><a href="http://docs.google.com/Doc?docid=0AZAp7BMj218VZGZneGtmbmpfMjBnNG13aHpkdg&hl=en_GB">amd_bang_per_watt.mysqldump4postgres </a><br />
</li>
<li>[ -^- data+create (compact form) using --compatible=postgresql ]</li>
</ul>
Having following the mysqldump documentation link through to reading about <a href="http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html">server modes</a> it seems that a reasonable expectation is as follows:<br />
<ul>
<li>Mysql is going to do what it can to help you when you ask for --compatible=somerdbms</li>
<li>Mysql will try and avoid giving you sql output it knows for sure will cause somerdbms a problem.</li>
<li>Mysql does is not promising 100% compatibility but just goes some way to making your task less onerous.</li>
</ul>
In particular you should not expect --compatible=postgresql to spit out sql which postgres can feed on right away - there is still some work to do.<br />
<br />
To give a quick illustration I took the .mysqldump4postgresSansOpt file and removed the row inserts and tried to get psql to execute it:<br />
<code><br />
cat /tmp/amd_bang_per_watt.mysqldump4postgresCreateOnly | psql amd_power_dissipation postgres<br />
Password for user postgres:<br />
ERROR: syntax error at or near "@"<br />
LINE 1: SET @saved_cs_client = @@character_set_client;<br />
^<br />
ERROR: unrecognized configuration parameter "character_set_client"<br />
ERROR: syntax error at or near "COMMENT"<br />
LINE 12: ...power_ratio" decimal(5,2) NOT NULL default '0.00' COMMENT 'b...<br />
^<br />
ERROR: syntax error at or near "@"<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=B004DALW5K&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
LINE 1: SET character_set_client = @saved_cs_client;<br />
</code><br />
As you can see postgres is not happy.<br />
<br />
So I clean it up a bit and retry:<br />
<code><br />
: #root@156ns1(~) ;cat /tmp/amd_bang_per_watt.mysqldump4postgresCreateOnlyCleanedUp | psql amd_power_dissipation postgres<br />
Password for user postgres:<br />
CREATE TABLE<br />
</code><br />
...better. Now what I had to do was get rid of the column comment for speed_power_ratio and get rid of the set type stuff mysql had placed before and after the create table block.<br />
<br />
Here are the files as I worked on them:<br />
<ul>
<li><a href="http://docs.google.com/Doc?docid=0AZAp7BMj218VZGZneGtmbmpfMjJjaDlrbXpoeA&hl=en_GB">amd_bang_per_watt.mysqldump4postgresCreateOnlyCleanedUp</a></li>
<li>[ -^- worked well once I /* */ wrapped the set type stuff ]</li>
<li><a href="http://docs.google.com/Doc?docid=0AZAp7BMj218VZGZneGtmbmpfMjFmbm5xc3ZocQ&hl=en_GB">amd_bang_per_watt.mysqldump4postgresCreateOnly</a></li>
<li>[ -^- postgres disliked the column comment amongst other things ]</li>
</ul>
So we have the table - lets get on run the inserts as follows (abbreviated):<br />
<code><br />
: #root@156ns1(~) ;cat /tmp/amd_bang_per_watt.mysqldump4postgresInsertsOnly | psql amd_power_dissipation postgres<br />
Password for user postgres: <br />
INSERT 0 1<br />
...<br />
INSERT 0 1<br />
</code><br />
The 'INSERT 0 1' feedback above is what we should expect given our setup here.<br />
Further reading of the <a href="http://www.postgresql.org/docs/8.3/interactive/sql-insert.html">postgres documentation for INSERT</a> and scanning down for oid should make things clear.<br />
<br />
A few quick selects to see if things look okay:<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=1849510288&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
<code><br />
postgres@ns1:~$ psql<br />
Password: <br />
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.<br />
<br />
Type: \copyright for distribution terms<br />
\h for help with SQL commands<br />
\? for help with psql commands<br />
\g or terminate with semicolon to execute query<br />
\q to quit <br />
<br />
postgres=# \l <br />
List of databases <br />
Name | Owner | Encoding <br />
-----------------------+----------+---------- <br />
amd_power_dissipation | postgres | UTF8 <br />
postgres | postgres | UTF8 <br />
template0 | postgres | UTF8 <br />
template1 | postgres | UTF8 <br />
(4 rows) <br />
<br />
postgres=# \dt<br />
No relations found.<br />
postgres=# \c amd_power_dissipation<br />
You are now connected to database "amd_power_dissipation".<br />
amd_power_dissipation=# select count(*) from amd_bang_per_watt;<br />
count <br />
------- <br />
50 <br />
(1 row) <br />
<br />
amd_power_dissipation=# select count(*),substr(process_comments,1,4) as nm from amd_bang_per_watt group by nm;<br />
count | nm <br />
-------+------ <br />
4 | x¹ 6 <br />
19 | 65nm <br />
2 | x¹ <br />
3 | x¹ Q <br />
1 | x¹ 4 <br />
6 | x¹ 2 <br />
15 | 45nm <br />
(7 rows) <br />
<br />
amd_power_dissipation=# select model,clock_speed,l3cache,tdp_watts,speed_power_ratio from amd_bang_per_watt where speed_power_ratio > 27;<br />
model | clock_speed | l3cache | tdp_watts | speed_power_ratio<br />
--------------------+-------------+---------+-----------+-------------------<br />
550 Black Edition | 3.1 | 6MB | 80 | 38.75<br />
545 | 3 | 6MB | 80 | 37.50<br />
720 Black Edition | 2.8 | 6MB | 95 | 29.47<br />
710 | 2.6 | 6MB | 95 | 27.37<br />
705e | 2.5 | 6MB | 65 | 38.46<br />
810 | 2.6 | 4MB | 95 | 27.37<br />
900e | 2.4 | 6MB | 65 | 36.92<br />
905e | 2.5 | 6MB | 65 | 38.46<br />
910 | 2.6 | 6MB | 95 | 27.37<br />
945 | 3 | 6MB | 95 | 31.58<br />
9100e | 1.8 | 2MB | 65 | 27.69<br />
9150e | 1.8 | 2MB | 65 | 27.69<br />
(12 rows)<br />
</code><br />
<div style="text-align: right;">
<div style="text-align: center;">
<span style="font-size: 85%;">Sidenote: Having tried the substr() funtion, it seems that the sql statement shown below works unaltered in both mysql and postgres:</span><br />
<code></code><br />
<code><span style="font-size: 85%;"> select count(*),substr(process_comments,1,4) as nm from amd_bang_per_watt group by nm;</span></code></div>
<code></code></div>
<br />
<br />
<b>Conclusion:</b><br />
<br />
The --compatible option of mysql goes some way to getting your data into postgres and this article hopefully gives a flavour of what manual steps you might have to take.<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=B004LDEQHA&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
<br />
Having worked through both options for getting the data in (csv and --compatible), I have to say that I am much in favour of using --compatible=postgresql and going that way.Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-26981183759920010052011-06-05T22:41:00.001+01:002011-06-05T23:07:28.252+01:00Natural Muesli - Wholegrain using your own ingredientsJust what exactly is in shop Muesli?<br />
<br />
Well that depends where you buy, but here is one 'basic' ingredients list:<br />
<ul><li>Wholegrain Oat Flakes (50%)</li>
<li>Wholegrain Wheat Flakes (40%)</li>
<li>Vegetarian Whey Powder (5%)</li>
<li>Raisins (3%)</li>
<li>Hazelnuts & Nuts (2%)</li>
</ul>If you visit a 3 or 4 star hotel, then the Muesli you will be presented with, will be quite different. But just how different?<br />
<br />
<br />
<b>Whole grains and variety of fruit and nuts - luxury:</b><br />
<br />
Premium oat flakes will be whole and perhaps of a larger size.<br />
<br />
Whole hazelnuts or halved hazelnuts rather than a few chips scattered about.<br />
<br />
Dried Apricots and fruit which is a bit pricier, rather than the cheapest ingredients often glazed.<br />
<br />
Fruit which has not been processed to aid longer storage ( glazing )<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=1453654216&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
<br />
Perhaps fresh seeds, rather than seeds toasted / glazed to aid preservation.<br />
<br />
Note: I have used the term Muesli here, if you instead use the term Granola then please substitute as you read.<br />
<br />
<br />
<b>Toasting Seeds - Makes for Tasty Muesli some folks feel:</b><br />
<br />
Dry Toast seeds over a textured heated surface for 2 to 3 minutes.<br />
<br />
Toss regularly during toasting and do not blacken the seeds.<br />
<br />
<br />
<b>Evil head of Dentistry - Toasting and Oil:</b><br />
<br />
Toasting seeds is one thing, toasting flakes another thing entirely.<br />
<br />
If I were the [fictional] Evil head of Dentistry, sitting stroking my cat, here is what I would mandate adding to all muesli:<br />
<ul><li>Glazed banana chips</li>
<li>Toasted oat flakes - toasted in oil</li>
<li>Toasted malted wheat flakes</li>
<li>Fruit all covered with a glazing agent ( vegetable oil )</li>
<li>Good old sugar ;) </li>
</ul>Why? Because all of these things will increase the pressure on a weak tooth, and make Muesli into a crunching exercise, rather than a mild grinding exercise.<br />
<br />
If you were Kwik Fit and wanted to sell more suspension parts, then one way is to persuade ordinary motorists to 'off-road' once every day.<br />
No different for [fictional] Evil head of Dentistry and your daily morning meal.<br />
<br />
Adding sugar to cereal is a great way of removing user choice. <iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=030735136X&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
Most folks who are aware of their sweetener intake, would make a conscious choice to sprinkle a little sugar on, or pass - might depend on mood or fancy.<br />
<br />
<br />
Adding sugar to cereal it could be argued does remove that choice, and any extra sugar in your diet, is good news for the Dentistry business.<br />
<br />
<br />
<br />
<b>Tesco 'Value' Muesli - how tasty, how healthy?</b><br />
<br />
<br />
'Value' ranges tend to ignore health as a measure of value and focus almost entirely on cost.<br />
<br />
<br />
The 'Value' Muesli ingredients list:<br />
<br />
<br />
Wheat Flakes, Oat Flakes, Barley Flakes, Malted Toasted Wheat Flakes, Raisins (4.5%), Whey Powder, Sugar, Hazelnuts<br />
<br />
Malted Toasted Wheat Flakes contain: Wheat Flakes, Barley Malt Extract.<br />
Raisins contain: Flame Raisins, Glazing Agent (Vegetable Oil).<br />
<br />
<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=1592334296&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
Some notable figures from the Tesco 'Value' Muesli <b>Nutrition</b> sheet:<br />
<br />
<br />
60% Carbohydrate<br />
15% Fibre<br />
10% Protein<br />
10% Sugars<br />
5% Fat<br />
<br />
How healthy? Well it helps to have something to compare it to - see next section.<br />
<br />
<br />
<br />
<b>Morrison</b><b> 'Value' Muesli - how tasty, how healthy?</b><br />
<br />
Add you own dry fruit (Apricots / Raisins / whatever)<br />
<br />
Add you own seeds or whatever you think makes a great breakfast taste for you.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDTECz_O-IXgsFSskbF01A42DzDTBF2AM4bS19UsdPt9RRWJg4WYXS6IzsNMvM7Az8I8atRkMDHPscxkeRI3Y7_zq0LfbPrTHXAnl9GlIXSr1D9_TyKJd746NQ0WQooAw4R9h-ooPAUAY/s1600/muesliValueIngredients__2011Q2morrisonsValueMuesli.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDTECz_O-IXgsFSskbF01A42DzDTBF2AM4bS19UsdPt9RRWJg4WYXS6IzsNMvM7Az8I8atRkMDHPscxkeRI3Y7_zq0LfbPrTHXAnl9GlIXSr1D9_TyKJd746NQ0WQooAw4R9h-ooPAUAY/s1600/muesliValueIngredients__2011Q2morrisonsValueMuesli.jpeg" /></a></div><br />
...and how healthy....<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPdbotwYLj63t-R3XmbgnkRZkollgGCBDbsABIGqfR0et0gEnVwIzR0XBKQopCAsa3-iSqPavtCs12aL7HgfN3NXDsdk8Dd0vOZ1NqIa7EfXY68XEbLMIm9ZA6muwFonQU-hpqaT20Mo/s1600/muesliValueInclNutritional__2011Q2morrisonsValueMuesli100g50g.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPdbotwYLj63t-R3XmbgnkRZkollgGCBDbsABIGqfR0et0gEnVwIzR0XBKQopCAsa3-iSqPavtCs12aL7HgfN3NXDsdk8Dd0vOZ1NqIa7EfXY68XEbLMIm9ZA6muwFonQU-hpqaT20Mo/s1600/muesliValueInclNutritional__2011Q2morrisonsValueMuesli100g50g.jpeg" /></a></div><br />
Hints quoted from the Muesli Recipe at greenfootsteps.com (below)<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=B002PJ4J5G&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
<blockquote>It is best not to have too many nuts and seeds in your muesli mix as they are rich in proteins and oils - the mix can become rather a challenge to the digestive system! </blockquote><blockquote>Chop the larger nuts into pieces. Almonds and coconut are best flaked. </blockquote><blockquote>Soak Muesli for at least half an hour before you want to eat it. </blockquote><br />
How about the Morrisons 'Value' and your Government recommended daily amount (GDA)?<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4k4CMTsMbFBXf80cg_sXJX5-kCOvw8UKgWQVpfHmA4Yar9gftokwmloOE5Hw1nqwY5G1O4_XLBhP_oB1cYKx8_Gsy20ac6q3TgqjOnmXtVNXz7FSVtT-jXumKYEoYsQBwuupN1Fx__cI/s1600/muesliValueInclNutritional__2011Q2morrisonsValueMuesli50gPlusSSmilkAsPercentageGDA.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4k4CMTsMbFBXf80cg_sXJX5-kCOvw8UKgWQVpfHmA4Yar9gftokwmloOE5Hw1nqwY5G1O4_XLBhP_oB1cYKx8_Gsy20ac6q3TgqjOnmXtVNXz7FSVtT-jXumKYEoYsQBwuupN1Fx__cI/s1600/muesliValueInclNutritional__2011Q2morrisonsValueMuesli50gPlusSSmilkAsPercentageGDA.jpeg" /></a></div><br />
How about Morrisons 'Value' versus Tesco 'Value' summary values quotes previously?<br />
<br />
Carbohydrates and Fat - the two 'Value' Muesli are comparable.<br />
<br />
Slightly more Protein in Morrisons<br />
<br />
Bit less Fibre in Morrisons<br />
<br />
<br />
<b>Can I make my own Muesli for £1 a Kilogram?</b><br />
<br />
£2->£4 per Kilogram is a more realistic figure.<br />
<br />
If you happen to live right near a <a href="http://www.survivalwholefoods.co.uk/">supplier of staple goods</a>, and have no <iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=157061525X&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe>transportation costs to consider, then you might just be able to hit £1 per kilogram.<br />
<br />
Supermarkets are really making no money at selling Muesli for £1 per Kilogram.<br />
My feeling is that it is a 'loss leader' intended to tempt you into the supermarket, rather than being a profitable line.<br />
<br />
At the top end of the market is £10 per kg <a href="http://www.rudehealth.com/our-food/organic-muesli">"Ultimate" organic muesli</a><br />
<br />
<br />
<b>Soak Muesli - Surely you can just eat it right after adding milk?</b><br />
<br />
Soaking Muesli helps break down the phytates in the fibre.<br />
<br />
Unsoaked Muesli (phytates intact) might prevent the absorption of Iron and other minerals by your system.<br />
<br />
If you don't like the idea of adding milk then waiting 30 minutes, then instead perhaps fortify your Muesli with iron rich additions such as:<br />
<ul><li>Chopped Almonds</li>
<li>Dates</li>
<li>Prunes</li>
<li>Pumpkin</li>
<li>Raisins</li>
<li>Wheat Bran</li>
<li>Sesame Seeds</li>
</ul>Having a Muesli made of Wholegrain Oats and Wholegrain Wheatflakes is higher in Iron, but higher in Phytates also, so do soak if you can.<br />
<br />
Phytates are an <a href="http://www.wikipedia.org/wiki/Antinutrient">anti-nutrient</a>, and by soaking you are helping to stop those <iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=0316777153&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe>compounds from binding to your nutrients, thus allowing your body to gain the nutrients as intended.<br />
<br />
<br />
<b>Notes and Further Reading:</b><br />
<br />
Most Health Foods stores and Supermarkets offer a 'Luxury' or 'Premium' muesli, and some are very good.<br />
<br />
The more pricier offerings, are probably little different to your 3* or 4* hotel variety, once you add some premium fresh / unpreserved fruit, seed, nuts to brighten further :)<br />
<br />
<a href="http://www.ocado.com/webshop/product/Muesli-Fruit-Seed--Nut-Waitrose/36403011">Waitrose Muesli</a> takes an interesting approach with main ingredients being Barley Flakes (12%) and Rye Flakes (8%) and Spelt Flakes (8%)<br />
<ul><li>Excellent <a href="http://local.greenfootsteps.com/Muesli_Recipe_Glasgow-r1328804-Glasgow_SC.html">Muesli Recipe</a> [ greenfootsteps.com ]</li>
<li>Wheatflakes for about 50p per Kilogram (<a href="http://www.survivalwholefoods.co.uk/shop.aspx?cn=A08&cat=Flakes&ki=Wheat&sb=pName&ss=wheat&db=w">25kg pack</a>*)<br />
[ survivalwholefoods.co.uk ]</li>
<li>"<a href="http://www.hollandandbarrett.com/pages/product_detail.asp?pid=2846&prodid=3655&MCatID=316&cid=433&sid=0">Muesli Fruit and Nut Original</a>" 2kg at Holland & Barret</li>
<li><a href="http://www.hollandandbarrett.com/pages/product_detail.asp?pid=2850&prodid=3653&MCatID=316&cid=433&sid=0">Muesli Base</a> at Holland & Barret [ hollandandbarrett.com ]</li>
<li><a href="http://www.hollandandbarrett.com/pages/product_detail.asp?pid=2855&prodid=3674&MCatID=316&cid=433&sid=0">Wheat Bran 750kg</a> for £1.19 (2011 price) at Holland & Barret</li>
<li><a href="http://www.purifymind.com/IronVegetarian.htm">Iron - Getting Enough</a> [ purifymind.com ]</li>
<li><a href="http://www.tesco.com/superstore/xpi/2/xpi52507952.htm">Tesco "Value" Muesli</a> - soon to disappear? [ tesco.com ]</li>
<li>Jordans Muesli - <a href="http://www.fatsecret.com/calories-nutrition/jordans/natural-muesli">Fat and Carbohydrate %</a> [ fatsecret.com ]</li>
<li>Malt - <a href="http://www.wikipedia.org/wiki/Malt">Description on Wikipedia</a></li>
<li><a href="http://foodily.com/r/7bJrTq2xe">Barley, Oats, & Rye Muesli</a> [ foodily.com ]</li>
<li><a href="http://foodily.com/r/5fZMRg42a">Luxury Muesli - ingredient amounts in cups</a> [ foodily.com ]</li>
</ul><div>*Buying for a commune or social housing project, you might be able to justify a 25kg pack of Wheatflakes, however a single person might take 20 -> 50 weeks to eat there way through that pack!</div><div><br />
</div><div><b>Ingredient amounts in cups / mugs - some examples to help with conversion to grams:</b></div><div><br />
</div><div>Cup of Oats is 70 grams</div><div>Mug of Oats is 100 grams </div><div><br />
</div><div>Cup of Morrisons 'Value' Muesli is 90 grams</div><div>Mug of Morrisons 'Value' Muesli is 130 grams<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=B0007GAWRS&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe></div><div><br />
</div><div>For dry cereals you can approximate using Mug = 1.45 Cups</div><div><br />
</div><div>All figures above are approximate. Use your own cup and scales for exact figures.</div><div><br />
</div>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-74842909555371974072011-05-31T14:16:00.003+01:002014-05-31T15:01:52.515+01:00Beep Beep - pcspkr and snd_pcsp quiet please!Having the flexibility to have the pc speaker / beep active in different contexts is useful, however it does require you to know, how to switch off beep, in each context.<br />
<br />
<br />
<b>tty terminal Ctrl+Alt+F1 - silence the beep:</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVkxWpP1tWu8_u1i8KVf0H8RxSPBnqceevIZJLKisttuVFoRlQeXDKfuYBCShpRxl2-Q-tLpTojjnI22YT-9IdyBlOEPR83W6jstYM0M-z7TSZ1Nm6FaOamnuapgGE8adrTYLA7Gs0zCE/s1600/beepTTYconsoleSilenceBeep__2011Q2beep-pcspkr-pcbeep-disableInEtc.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVkxWpP1tWu8_u1i8KVf0H8RxSPBnqceevIZJLKisttuVFoRlQeXDKfuYBCShpRxl2-Q-tLpTojjnI22YT-9IdyBlOEPR83W6jstYM0M-z7TSZ1Nm6FaOamnuapgGE8adrTYLA7Gs0zCE/s1600/beepTTYconsoleSilenceBeep__2011Q2beep-pcspkr-pcbeep-disableInEtc.jpeg" /></a></div>
<br />
Here (as root) I created a file named <code>/etc/profile.d/beep-pcspkr-pcbeep-disable.sh</code> and included a setterm command.<br />
<br />
Permissions of 644 work okay for this file.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQWeqRmsfj_Cja-JV1gubC7rwikHh2hz1Qa2ZRcOQV6GOVWPI6z-U7Se06DKEXNz_OytNitYVTddh9ynhMHl7k5Z2uW0jJ7IqPqtrTiPaA_etkc1Kt_dtdLI-CoZAiehXU_EQXr0wSkIA/s1600/beepTTYconsoleSilenceBeep__2011Q2beep-pcspkr-pcbeep-disableInEtcHavingPermissions644.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQWeqRmsfj_Cja-JV1gubC7rwikHh2hz1Qa2ZRcOQV6GOVWPI6z-U7Se06DKEXNz_OytNitYVTddh9ynhMHl7k5Z2uW0jJ7IqPqtrTiPaA_etkc1Kt_dtdLI-CoZAiehXU_EQXr0wSkIA/s1600/beepTTYconsoleSilenceBeep__2011Q2beep-pcspkr-pcbeep-disableInEtcHavingPermissions644.jpeg" /></a></div>
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;"> </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;"> </span></span>What you should now experience is a TTY console having no beep.<br />
<br />
Switch to a tty console login using Ctrl+Alt+F1 and login, your shell completion should now be free of any audible feedback beep.<br />
<br />
<br />
<b>X terminal - xfce4 terminal - silence the beep:</b><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;"> </span></span>Graphical desktops (X based) have their own preferences for audio feedback beep, and in my terminal xfce4-terminal, the preference is shown below:<br />
<br />
<pre>MiscBell=FALSE</pre>
<br />
...which can be found in the file <code>.config/Terminal/terminalrc</code><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjpN3QD-n3m7o-fe_ImvCf3-meHrCeGkPcdw5arGpO5Ww0S8E2TJSggyahEKevE64kfGM0ir4wO4XJ4vqHwUA-NaCfGPnr4VcmRbepTMSHBKGOdfm3FIIfx64Jk5cSrnoO9gsCBlGa108/s1600/xtermSilenceBeep__2011Q2beep-pcspkr-pcbeep-disableInHomeConfigFile.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjpN3QD-n3m7o-fe_ImvCf3-meHrCeGkPcdw5arGpO5Ww0S8E2TJSggyahEKevE64kfGM0ir4wO4XJ4vqHwUA-NaCfGPnr4VcmRbepTMSHBKGOdfm3FIIfx64Jk5cSrnoO9gsCBlGa108/s1600/xtermSilenceBeep__2011Q2beep-pcspkr-pcbeep-disableInHomeConfigFile.jpeg" /></a></div>
<br />
But my MiscBell=TRUE?<br />
<br />
Change it to FALSE using an editor if you want to silence the beep.<br />
<br />
But my user does not have a file <code>.config/Terminal/terminalrc</code> - does not exist?<br />
<br />
Xfce4-terminal has a preferences screen in Edit->Preferences, go into there and change 'initial title' from Terminal to Xfce4terminal and select 'Close'<br />
<br />
What your action above did, was trigger the creation of <code>.config/Terminal/terminalrc</code><br />
<br />
Now you can make your edit.
<br />
<br />
<b>Why would you want a beep anyway?</b><br />
<br />
Some command line novices find the audible beep a useful feedback mechanism.<br />
<br />
Being a novice, back before Red Hat became Red Hat Enterprise Linux, I remember using the feature myself.<br />
<br />
<br />
<br />
<br />
<b>But I still have a bootup and reboot Beep - absolute silence please?</b><br />
<br />
Mute the 'PC Beep' column in alsamixer using the 'm' key.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmeGAXDT-KIUK0OYhMvfg-hWtJhbRBX7Irsy3u4VFQHoCOwbW3bd7c0pSo2TRZM9UtftPBfbcgelLLxuQTzbxwr69ylguAaOpDgXz8fVAxhyphenhyphenfpWyjpe2L6e15J__JaPLEx2tkvxxEoxVo/s1600/globalSilenceBeep__2011Q2alsamixerMutePCbeep.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmeGAXDT-KIUK0OYhMvfg-hWtJhbRBX7Irsy3u4VFQHoCOwbW3bd7c0pSo2TRZM9UtftPBfbcgelLLxuQTzbxwr69ylguAaOpDgXz8fVAxhyphenhyphenfpWyjpe2L6e15J__JaPLEx2tkvxxEoxVo/s1600/globalSilenceBeep__2011Q2alsamixerMutePCbeep.jpeg" /></a></div>
<br />
<ul>
<li>Startup alsamixer from a terminal (not required to be root)</li>
<li>Navigate right until the PC beep column is highlighted</li>
<li>Press 'm' to mute that column</li>
</ul>
Exit alsamixer using <b>Esc</b> (avoid pressing Q as this is the key for volume increase) <br />
<br />
There is no need to explicitly save alsa settings, as simply exiting using Esc is enough to make your new settings persistent.<br />
<br />
Note: PC Beep '00' is probably not going to be complete silence. Mute the thing.<br />
<br />
<br />
<b>Notes and Further Reading:</b><br />
<br />
<ul>
<li><a href="http://manpages.debian.net/cgi-bin/man.cgi?query=alsamixer&apropos=0&sektion=0&manpath=Debian+6.0+squeeze&format=html&locale=en">Manpage of alsamixer</a> [ manpages.debian.net ]</li>
<li><a href="http://screenshots.debian.net/screenshots/a/alsa-utils/7137_large.png">Screenshot</a> of alsamixer [ screenshots.debian.net ]</li>
<li>alsa-utils <a href="http://www.alsa-project.org/main/index.php/ALSA_User_Info#ALSA_utils">list of programs</a> [ alsa-project.org ] <br />
</li>
<li><a href="http://www.alsa-project.org/main/index.php/SoundcardTesting">Soundcard testing guide</a> [ alsa-project.org ]<br />
</li>
</ul>
<br />
The alsa-utils package contains the program alsamixer. The package <a href="http://packages.debian.org/stable/alsa-utils">alsa-utils</a> should already be installed on your system. If not use the following:<br />
<br />
<pre>apt-get install alsa-utils</pre>
<br />
<div style="text-align: right;">
( apt-get above is for Debian and derivatives including Ubuntu)</div>
<br />
<pre>yum install -y alsa-utils</pre>
<br />
<div style="text-align: right;">
( yum for Fedora / Red Hat / MeeGo and similar )</div>
<br />
That alsa-utils package includes a utility named aplay, which can be used to check which sound devices in your system are known to alsa.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinhTvpC_44b9UpqyA4koBuOz9Vj_Ky7NHoF_fVjHw5wes2WY4q-LO2rQISt8nR7SBJd4MEpYQM7ZrVLbJSnPkFoNvhG63AZPAy0NKijjQI4GEA8u3uioaRtNwZRqB-qSFa5jncN3KyRAw/s1600/aplayALSAcheckWhichSoundcardsListed__2011Q2dellInspiron1525debian.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinhTvpC_44b9UpqyA4koBuOz9Vj_Ky7NHoF_fVjHw5wes2WY4q-LO2rQISt8nR7SBJd4MEpYQM7ZrVLbJSnPkFoNvhG63AZPAy0NKijjQI4GEA8u3uioaRtNwZRqB-qSFa5jncN3KyRAw/s1600/aplayALSAcheckWhichSoundcardsListed__2011Q2dellInspiron1525debian.jpeg" /></a></div>
<br />
The above is a Dell Inspiron 1525 laptop, which I am currently setting up with Debian Squeeze. This laptop will have an Xfce desktop, and I have yet to test HDMI audio output, as HDMI port is not something I use regularly.Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-73063700258444350612011-05-28T16:48:00.002+01:002011-05-28T18:51:31.893+01:00Terminal Preferences - #C0C0C0 and "Terminus Bold" 16Terminal and "Grey on Black":<br />
<br />
I am fascinated by folks who use white on black, and often wonder if it is just a lack of knowing, where / how to change the text colour.<br />
<br />
<br />
#C0C0C0 is an nice Grey for text appearing on a Pure Black (#000000) background<br />
<br />
<br />
<b>Terminal Font - Monospace or Terminus:</b><br />
<br />
The default in my Xfce terminal on Debian is 'Monospace', which is a perfectly usable font.<br />
<br />
Going a little retro with <a href="http://packages.debian.org/stable/console-terminus">Terminus</a><iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=B0015YMWYW&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
<br />
For widescreen desktop: "Terminus Bold" 16<br />
<br />
For 15" laptop: "Terminus Bold" 14<br />
<br />
<br />
<b>Terminal Bell - love it or loath it:</b><br />
<br />
For Xfce terminal, there is a MiscBell option in preferences file which should be set TRUE if you want to hear beep.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSCH5eQ_7_DuZOiy9esgiB5D2OB2Q2u5GzlUO1algx-m-PzRlZZFCooBOLJFs3cvYPpXuv-KpRFwjUMh9kaD6ocR1tgPFDy47Oiw9M4CKGmtIYprVz8RZB8fzhnVY8jhixGsruGzDL7zo/s1600/xfce4terminalBell__2011Q2MiscBellEqualsTRUE.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSCH5eQ_7_DuZOiy9esgiB5D2OB2Q2u5GzlUO1algx-m-PzRlZZFCooBOLJFs3cvYPpXuv-KpRFwjUMh9kaD6ocR1tgPFDy47Oiw9M4CKGmtIYprVz8RZB8fzhnVY8jhixGsruGzDL7zo/s1600/xfce4terminalBell__2011Q2MiscBellEqualsTRUE.png" /></a></div><br />
<br />
<b>Terminal programs and terminal fonts - listings:</b><br />
<br />
Just a quick hint or two for programs / fonts you might try.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmxjApP5i9DuIzaA6zdlTLK0bhEdddOi3D0eEJhgV0-Dvsc9yLjk3sEHtexlZTvqODymNvFX4Qfi3Z8d_4QrLFeePEpjtcnUAUfqH3GGsRFA3EbrfiTF8X7wXy7vfJEJo1vbjY07tKaXA/s1600/termTypeProgramsInstalledInclTerminalFonts__2011Q2inclTerminus.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmxjApP5i9DuIzaA6zdlTLK0bhEdddOi3D0eEJhgV0-Dvsc9yLjk3sEHtexlZTvqODymNvFX4Qfi3Z8d_4QrLFeePEpjtcnUAUfqH3GGsRFA3EbrfiTF8X7wXy7vfJEJo1vbjY07tKaXA/s1600/termTypeProgramsInstalledInclTerminalFonts__2011Q2inclTerminus.jpeg" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV9hEpYzfxxzmGeyDgkzcZxLGxaxHYg-Fwuz9GiFT7HSeUB4if51VDULxeLZb4kay4_zLBsGWPruVejrFEsIrwBzwlfYOnxUVql4PwpRgcanScadzJYTuziIoDQ9pYbvJL1jOiBzTERpQ/s1600/termTypeProgramsInstalledInclTerminalFonts__2011Q2inclTerminusAndInconsolata.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV9hEpYzfxxzmGeyDgkzcZxLGxaxHYg-Fwuz9GiFT7HSeUB4if51VDULxeLZb4kay4_zLBsGWPruVejrFEsIrwBzwlfYOnxUVql4PwpRgcanScadzJYTuziIoDQ9pYbvJL1jOiBzTERpQ/s1600/termTypeProgramsInstalledInclTerminalFonts__2011Q2inclTerminusAndInconsolata.jpeg" /></a></div>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-20432086185190860712011-05-26T15:43:00.004+01:002013-05-25T11:36:20.572+01:00Onboard Sata type - Ahci or IDE - which bestIf you are a Windows user then you will have to go search based on your particular version - advice varies per version, and read up about install time drivers.<br />
<br />
For GNU / Linux there is just a single set of current advice.<br />
However if you are installing with a motherboard that has secure boot / Uefi, then you need to get familiar with these gatekeepers or experiment (some suggestions below )<br />
<br />
This post has been edited since it was first published, and this 4 point summary is added:<br />
<ol>
<li>Use Ahci rather than Ide mode where you are doing a new install</li>
<li>Existing installs should not switch from Ahci to Ide or vice versa once the operating system is already configured</li>
<li>The main thing that Ahci will give you is support for Native Command Queuing which is a hard drive feature.</li>
<li>If you are unable to install GNU/Linux with secure boot / uefi or other restrictive gatekeeper software with Ahci setting, then try ide mode and see if that allows the disk to be recognised (Later you can rebuild initrd and flick the bios switch if you feel you desperately need NCQ support)</li>
</ol>
If your problem is that the drive (hard drive / usb drive) is not being recognised so you cannot install Linux, then you can either become a master of secure boot zzzzzz, or just switch the thing off (there is usually a secure boot Yes/No in bios)<br />
<br />
<br />
<b>Choose at the outset - don't try changing it later:</b><br />
<b> </b><br />
<br />
The reasons for choosing Ahci or IDE will be covered next. But first you should make a commitment now to 'get it right' and stick with that setting.<br />
<br />
To enable fast booting, grub (by default) will only includes the drivers it really needs, based on your initial system configuration.*<br />
<br />
If you set your system up with 'Onboard Sata type' as Ahci, then later try and switch that mode in your bios, then you are asking for trouble.<br />
<br />
If you set your system up with 'Onboard Sata type' as IDE, then later try and switch that mode in your bios, then you are asking for trouble.<br />
<br />
Read on to make sure you 'get it right' at the outset. <br />
<br />
*Sometimes this minimal approach is termed 'targeted' grub.<br />
<br />
<br />
<b>SATA and IDE emulation:</b><br />
<br />
<u>Do not use 'IDE mode'</u> for Sata for any new install unless you are installing operating systems which had an initial release prior to 2007.<br />
<br />
Use Ahci for current Debian and current Red Hat and similar.<br />
<br />
The whole point of having a 'IDE mode' for SATA controllers was to help then current software ( Red Hat 5 & Windows XP ) cope with the change in disk standards.<br />
<br />
The change to a newer version of Windows from Windows XP is not to be taken lightly for organisations with > 50 employees, which is why some IT departments continue to support that stable release.<br />
<br />
Moving versions of Debian (Lenny -> Squeeze -> Wheezy) is much less of an issue, which is why most Debian installs were migrated from Etch long ago.<br />
<br />
Moving point release of Red Hat Enterprise Linux (6.2 -> 6.3 -> 6.4) is also not a big deal, however there is just one caveat.<br />
<br />
Red Hat is extremely popular as a base system for lots of virtualisation 'hosting containers'. If this is your situation, then that might require a little more planning as hosting 40->200 VPS atop of Red Hat does make a migration a bit more involved.<br />
<br />
<br />
<b>Grub (initrd) and Ahci:</b><br />
<br />
What will happen if you have 'Onboard Sata Type' set Ahci, and then do a GNU / Linux install, is that the boot mechanism (grub and initrd) will be built during install with <span style="font-size: large;"><span class="comment-copy" style="font-family: "Courier New",Courier,monospace;"><code>--preload=ahci</code></span></span><br />
<br />
To keep boot times down and loading from disk optimal, GNU / Linux installs keep the initrd minimal (only what your system needs*).<br />
<br />
This approach gives sub 30 second boot times on my laptop (which I appreciate), however it does put the onus on you to choose the right bios setting <b>and stick with it</b>.<br />
<br />
If 'Onboard Sata Type' was IDE mode when you installed, and then later you switched bios to be 'Onboard Sata Type' as Ahci, then ...<br />
<blockquote>
the workaround is to build a new initrd containing the AHCI module.<a href="http://en.wikipedia.org/wiki/Advanced_Host_Controller_Interface#cite_note-3"></a></blockquote>
Source: <a href="http://en.wikipedia.org/wiki/Advanced_Host_Controller_Interface#Operating_system_support">Wikipedia</a><br />
<br />
There is a great Fedora specific posting <a href="http://fedoraforum.org/forum/showthread.php?t=202286">here</a> describing in more detail why changing the bios setting after your install was done, will lead to issues.<br />
<br />
*The latest Debian installer, specifically asks you if you want a 'targetted' boot setup or the more bloated but future proofed version - the choice is yours :)<br />
<br />
<br />
<b>Initially bios option was set 'Ahci' but for some reason now want IDE:</b><br />
<br />
Hey maybe this is a little dose of nostalgia...what you are saying is in 2011 my system will be set to act like a 2006 / 2007 system.<br />
<br />
Have no idea why you might choose to do this, however the kernel boot time option <b><span style="font-family: "Courier New",Courier,monospace;">all_generic_ide</span></b> might be what you require.<br />
<br />
<br />
<b>Ahci is not listed as an option in my bios - what should I do:</b><br />
<br />
The bios menu selection might be titled '<b>Sata Controller Mode</b>' or '<b>Onboard Sata Type</b>' and should list two or three options.<br />
<br />
Some bios have a selectable option named 'Compatible (sata only)', which is I guess just another way of saying Ahci<br />
<br />
<br />
<br />
<b>My operating system is <u>very early</u> version of Red Hat Enterprise Linux 5:</b><br />
<br />
Check your kernel version. Kernel 2.6.18 is 5 years old now. Kernel 2.6.19 and newer, all support Ahci.<br />
<br />
If you are thinking about doing an install today of a version of GNU / Linux that uses Kernel 2.6.18 then think again. Justify your choice to yourself.<br />
<br />
The current 'stable' of Debian uses 2.6.32 and that is pretty conservative. <br />
<br />
RHEL6 kernel is RHEL 6.0, Linux 2.6.32-71.29.1.el6.x86_64<br />
<br />
Any kernel configured from the current kernel tree in the last 5 years,<br />
should be > kernel 2.6.19 and therefore have Ahci support.<br />
<br />
Kernel 2.6.32 and newer and Kernel 3.2 and newer have excellent support for Ahci.<br />
<br />
<br />
<br />
There are <a href="http://kvmdedicated.blogspot.com/2010/06/upgrading-vps-to-2010-version-of-linux.html">other reasons</a> why Kernel 2.6.18 for an OS acting as host container, might not be ideal.<br />
<br />
<br />
<b>Notes and further reading:</b><br />
<br />
<ul>
<li><a href="http://en.wikipedia.org/wiki/Advanced_Host_Controller_Interface#Operating_system_support">Ahci operating system support</a> [ wikipedia.org ] </li>
<li>Kernel 2.6.18 is <a href="http://forum.linode.com/viewtopic.php?p=38768">now considered 'legacy'</a> [ linode.com ]</li>
<li><a href="http://kvmdedicated.blogspot.com/2010/06/upgrading-vps-to-2010-version-of-linux.html">Linux Kernel and signalfd support</a> [ kvmdedicated.blogspot.com ]</li>
<li>Kernel <a href="http://kerneltrap.org/node/7144">2.6.18 released</a> in 2006 [ kerneltrap.org ]</li>
<li>Switching modes between Ahci and IDE - <a href="http://fedoraforum.org/forum/showthread.php?t=202286">initrd implications</a><br />
[ fedoraforum.org ]</li>
<li>Getting nostalgic with <a href="http://www.linuxquestions.org/questions/suse-novell-60/installed-with-ahci-enabled-now-wont-boot-without-it-639416/">kernel option <span style="font-family: "Courier New",Courier,monospace;">all_generic_ide</span></a> </li>
<li>Switching modes between Ahci and IDE - <a href="http://www.techpowerup.com/forums/showthread.php?t=41373">system woes</a> [ techpowerup.com ]</li>
<li>Supplying the <a href="http://www.tomshardware.co.uk/forum/239637-14-sata-tell">correct driver to Windows XP and Ahci</a><br />
[ http://www.tomshardware.co.uk ]</li>
</ul>
<br />
If you are working with bios that make necessary choice between Ahci and IDE today, then perhaps rather than being nostalgic, you are installing GNU / Linux on second hand machines.<br />
<br />
Plenty of non-profits and charities are using donated hardware, and this might be your work.<br />
<br />
If so, you might also find <a href="http://www.esdebian.org/foro/32060/problemas-alsa-debian-squeeze">this link</a> regarding AC97 audio, handy for new installs of Debian Squeeze, on that legacy hardware.<br />
<br />
For native English speakers a translation <a href="http://translate.google.com/translate?js=n&sl=auto&tl=en&u=http%3A%2F%2Fwww.esdebian.org%2Fforo%2F32060%2Fproblemas-alsa-debian-squeeze">here</a><br />
<ul></ul>
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-7985508648795573022011-05-16T22:12:00.001+01:002011-05-16T22:17:42.492+01:00mercurial init - git init - summary clone and push<span style="font-size: large;"><code>hg init</code></span> or <span style="font-size: large;"><code>git init</code></span><br />
<br />
...are generally the first commands I use.<br />
<br />
<br />
Have your code ready and a reasonable directory structure in place.<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=0596800673&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
<br />
Add a README and a LICENSE file (<a href="http://www.blogger.com/">OSI approved licenses</a> in my case)<br />
<br />
<pre><span style="font-size: large;">hg init</span></pre><br />
...and you are up and running (for your git stuff <span style="font-size: large;"><code>git init</code></span>)<br />
<br />
If you are working from an existing codebase then you might want 'clone'<br />
<br />
<pre><span style="font-size: large;">hg clone http://hg.savannah.nongnu.org/hgweb/someproject</span></pre><br />
<br />
<b>Publishing one time projects via git lends itself well to a set recipe:</b><br />
<br />
<ol><li>git init</li>
<li>git add . </li>
<li>git commit -m 'first commit of GPL3 licensed python scripts'</li>
<li>git remote add origin git@github.com:someuser/apt-utils-python-shell.git </li>
<li>git push -u origin master<br />
[ Above we used -u switch (--set-upstream) which is correct ]</li>
<li>git add README</li>
<li>git commit -m 'added some to README' </li>
<li>git push origin master<br />
[ Note there is no -u switch here which is correct ]</li>
</ol><br />
<b>Openshift and git - what commands there?</b><br />
<br />
In order to commit to your new project, ...<iframe align="right" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=droidbook-21&o=1&p=8&l=bpl&asins=0321720202&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="align: right; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe><br />
<br />
Make your changes, then run:<br />
<br />
<pre>git commit -a -m 'Some commit message'
git push</pre><br />
Then reload this page<br />
<br />
Note: The above is quoted from the openshift page<br />
<br />
<br />
<b>Notes and further reading:</b><br />
<br />
If you feel the desire to host your own Mercurial from which other folks can pull, then:<br />
<br />
<br />
<pre><span style="font-size: large;">hg serve </span></pre><br />
and the point browser at <span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><a class="http" href="http://localhost:8000/" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; text-decoration: underline;">http://localhost:8000/</a></span><br />
<br />
<br />
Note: If your machine is internet facing rather than on a private company network, then you should think about authentication / security, and follow this guide:<br />
<a href="http://mercurial.selenic.com/wiki/CGIinstall">Setting up a Mercurial CGI server</a><br />
<br />
Alternatively you could think about <a href="http://packages.debian.org/stable/trac-mercurial">Trac</a><br />
<br />
<br />
<br />
If you feel the desire to host your own Git from which other folks can pull, then:<br />
<br />
<pre><span style="font-size: large;">git-daemon </span></pre><br />
and the point browser at <span class="Apple-style-span" style="border-collapse: separate; color: black; font-family: sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><a class="http" href="http://localhost:9418/" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; text-decoration: underline;">http://localhost:9418/</a></span><br />
<br />
Note: If your machine is internet facing rather than on a private company network, then you should think about authentication / security, and read up about <a href="http://packages.debian.org/stable/gitosis">gitosis</a> or gitweb.<br />
<br />
<br />
<ul><li><a href="https://openshift.redhat.com/app/repo/openshift.repo">Openshift repo</a> at Red Hat</li>
<li>Openshift <a href="https://www.redhat.com/openshift/videos">tutorial videos</a> [ openshift.redhat.com ]</li>
<li>Openshift - <a href="https://www.redhat.com/openshift/kb/kb-e1006-sync-new-express-git-repo-with-your-own-existing-git-repo">sync local git repo with remote 'express' repo</a></li>
</ul>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com1tag:blogger.com,1999:blog-4232685199043658241.post-67180171849258930562011-05-14T19:03:00.005+01:002011-06-01T23:48:00.997+01:00mailserver A is "inherently" better than mailserver BFor GNU / Linux there are several good mailserver packages.<br />
<br />
Here are a handful (in alphabetical order):<br />
<ul><li>Exim</li>
<li>Postfix</li>
<li>Qmail</li>
<li>Sendmail</li>
</ul>There are others, but for the purposes of this article that is enough to go on.<br />
<br />
Each of these packages will have their own fanbase. If you have a long history with Plesk hosting automation, then you might well love Qmail ... why? Because you know it inside out.<br />
<br />
<br />
<b>Exim 4 is inherently more secure than Postfix:</b><br />
<br />
No it is not.<br />
<br />
Neither is Exim 4 <i>inherently</i> less secure than Postfix.<br />
<br />
But there was recently <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624670">a vulnerability in Exim 4</a> around <a href="http://www.wikipedia.org/wiki/DomainKeys_Identified_Mail">dkim signatures</a>?<br />
<br />
Yes there was. Debian users should have the security repository of Debian active (by default) and automatic updates (usually active by default on login to Gnome).<br />
<div style="text-align: center;"><span style="font-size: x-small;">( See links at the end for further information about Debian and automatic updates)</span></div><br />
However postfix <a href="http://www.debian.org/security/2011/dsa-2233">does get vulnerabilities</a> also.<br />
<br />
Mailservers are complicated and involve a huge codebase. Recent changes have been made, particularly to incorporate functionality around dkim.<br />
<br />
When humans code, other humans will review and sometimes mistakes will be found and then corrected.<br />
<br />
<br />
But what about Qmail - there is a stable codebase that has changed little in 10 years? Well Qmail has a small core codebase and recent functionality is added via patches. Is this a better way to maintain a mailserver? You decide.<br />
<br />
<br />
<b>Debian and Automatic Updates:</b><br />
<br />
For Gnome desktop users (including Ubuntu migrants), the easiest way is to install <a href="http://packages.debian.org/stable/update-manager-gnome">update-manager-gnome</a><br />
<br />
Here are some other useful packages if you run a different desktop, or prefer to have updates happen, without a graphical interaction:<br />
<ul><li><a href="http://packages.debian.org/stable/cron-apt">cron-apt</a> which is a utility for background download (optional email output)<br />
<br />
[ once installed issue <span style="font-family: "Courier New",Courier,monospace;">ln -s /usr/sbin/cron-apt /etc/cron.daily/</span> ]<br />
</li>
<li><a href="http://packages.debian.org/stable/aptdaemon">aptdaemon</a> another daemon, that can be used with <a href="http://packages.debian.org/stable/policykit-1">user privileges</a> and an optional frontend<br />
<br />
</li>
<li>package named <a href="http://packages.debian.org/stable/unattended-upgrades">unattended-upgrades</a> (see below) </li>
</ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVeIp18itN3JiNqnIYz2SWCp2VKaLtRCqAblWECX6V2Wp3H_psF1890bUi1hlT1tvv_jrEcw_F9hwEFxW0nOD4tv3EJoGlrk1GV0UHtdd2mlpIe9XogCIkrwZHXjpjBH4CNPQ5OxJdtOc/s1600/stable-unattended-upgrades__201105.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVeIp18itN3JiNqnIYz2SWCp2VKaLtRCqAblWECX6V2Wp3H_psF1890bUi1hlT1tvv_jrEcw_F9hwEFxW0nOD4tv3EJoGlrk1GV0UHtdd2mlpIe9XogCIkrwZHXjpjBH4CNPQ5OxJdtOc/s640/stable-unattended-upgrades__201105.jpeg" width="640" /></a></div><br />
<br />
If you are really comfortable with cron anyway, you might just want something like this for your updates:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">50 11 * * * ( apt-get -q update && apt-get -qy upgrade -u )</span><br />
<br />
<br />
<br />
<b>The Debian project, and how an active upstream can influence choice:</b><br />
<br />
Distributions are a little like biological systems in some ways, things become more popular, things become less popular. Not unlike natural selection in a fashion.<br />
<br />
One of the things that Debian novices and even some experienced SysAdmins do not appreciate, is the importance of 'upstream'<br />
<br />
It might be the tastiest code morsal your system has chewed in years, however somebody has to package the thing <b>and maintain it</b><br />
<b> </b> <br />
If upstream is inactive or uncooperative (it does happen), then it sometimes can put undue pressure on the maintainer.<br />
<br />
With no upstream support, a complex package, will perhaps, have more outstanding bugs, or the maintainer might decide the weight it too much to carry alone.<br />
<br />
Even if you are not doing Debian packaging, but might be making a commitment to a certain mailserver, then do ask about upstream.<br />
<br />
How active is the upstream of Mailserver A?<br />
How active is the upstream of Mailserver B? <br />
<br />
<br />
If you are going to build a business around systems that include mailserver installs, then you want to know this!<br />
<br />
Here is <a href="http://bugs.exim.org/">Exim own bug tracking system</a> - how convenient :)<br />
<br />
<br />
<b>Crackers and mailservers - the case for mailserver diversity:</b><br />
<br />
<span style="font-size: x-small;">( Crackers: Folks who break into systems - think hackers if that is clearer for you )</span><br />
<br />
If there was only one single GNU / Linux distribution, and every desktop and server in the world was GNU / Linux - wouldn't the world be great!<br />
<br />
Well actually, <b>NO</b>.<br />
<br />
Folks who make a business out of breaking into systems, have a skillset, just like regular developers and System Administrators.<br />
<br />
The less the diversity in commonly run server based services, the better for the cracker.<br />
<br />
In todays diverse GNU / Linux world that cracker is not going to just crack mailservers, he will likely have a toolkit of useful things s/he is knowledgeable in. SSL, file obfuscation, whatever.<br />
<br />
However the wider the skill set required to be effective, the fewer people will be drawn into seeing 'blackhat' activities as an <i>easy</i> career. <br />
<br />
Now if that cracker wants to compromise the mail server on a Red Hat system, then he needs to know Sendmail and it's vulnerabilities / attack vectors.<br />
<br />
Now if that cracker wants to compromise the mail server on a Plesk automation system, then he needs to know Qmail and it's vulnerabilities / attack vectors.<br />
<br />
Now if that cracker wants to compromise the mail server on a Debian system, then he needs to know Exim and it's vulnerabilities / attack vectors.<br />
<br />
This is all assuming that the mailserver administrator has just 'gone with the flow'. They might not, they might have installed any of the 4 mailservers in my original list.<br />
<br />
You know the Red Hat admin might have installed Exim, or the Debian admin might have installed Postfix.<br />
<br />
My point is, that reducing diversity in mailservers, to the point that there is only one type of mailserver, might be considered making it easy for crackers.<br />
<br />
Modern day cracking toolkits have lowered the barriers to entry for crackers somewhat. Let's not make it too easy for intruders by trying to extinguish choice through rabid fanboyism.<br />
<br />
There are arguments for 'biodiversity' in the plant world. In this article, I have presented one argument for diversity in server based services.<br />
<br />
I personally hope Qmail is around for another decade ... my argument for diversity.<br />
<br />
<br />
<b>Notes and Further reading:</b><br />
<br />
An Extract from the Exim4 description:<br />
<blockquote>If you build exim4 from the source package locally, you can also build an exim4-daemon-custom package tailored to your own feature set. </blockquote><br />
If your business is going to create some custom functionality around a mailserver, then that sort of thing might appeal.<br />
<ul><li><a href="http://qa.debian.org/popcon.php?package=exim4"> Number of installs of Exim 4</a> on Debian systems</li>
<li><a href="http://qa.debian.org/popcon.php?package=postfix">Number of installs of Postfix</a> on Debian systems</li>
<li><a href="http://xorl.wordpress.com/2011/05/06/exim-dkim-signatures-remote-format-string/">More about the Exim 4 dkim error</a> including examination of the C code</li>
<li>Exim dkim bug (bug <a href="http://bugs.exim.org/show_bug.cgi?id=1106">#1106</a>) </li>
<li>Exim dkim Debian bug report <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624670">#624670</a></li>
<li><a href="http://security-tracker.debian.org/tracker/source-package/exim4">Debian Security page for Exim</a></li>
<li>Postfix TLS and SASL related memory vulnerability May 2011<br />
<a href="http://www.postfix.org/CVE-2011-1720.html">CVE-2011-1720</a> and <a href="http://packages.qa.debian.org/p/postfix/news/20110511T015515Z.html">Debian package update </a></li>
</ul><br />
<a href="http://cialug.org/pipermail/cialug/2010-August/017392.html">Here</a> is an example of the <a href="http://cialug.org/pipermail/cialug/2010-August/017397.html">type of debate</a> that starts up when somebody asks "<a href="http://cialug.org/pipermail/cialug/2010-August/017394.html">What mailserver for Debian</a>".<br />
<div style="text-align: center;"><span style="font-size: x-small;">( Nothing wrong with that sort of discussion, however do bear in mind my earlier point, about mailservers and fanbase. )</span></div>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-58631954343989745032011-04-30T01:58:00.003+01:002016-01-31T12:40:15.237+00:00Switch from GPL - The Dual Licensing Gloss over<code> .</code><br />
<b>Leaving the GPL - the gloss over:</b><br />
<br />
Puppet has provided an example of a change in licensing, which I will refer to in this article.<br />
<br />
"I know this argument doesn’t persuade all of you"<br />
...Somebody forgot to mention dual licensing perhaps.<br />
<br />
Fact is if you want to go Apache, then go Apache, no need to gloss over dual licensing option, and suggest that your hand was somehow forced.<br />
<br />
<br />
<b>GPL versus BSD / MIT / Apache style Licensing:</b><br />
<br />
For a useful Comparison MySQL is GPL, but Postgres is under more of an Apache style license.<br />
Personally I really like Postgresql, however there is no denying that MySQL does seem to be the bigger of the two in terms of counting installations.<br />
<br />
The GPL allows you to charge for your software, and companies do just that (MySQL enterprise), aswell as selling support.<br />
Both of these things are no easier for Puppet now that it is under an Apache license.<br />
<br />
"Apache enables far more partnerships", well now Infobright and Calpont seem to be getting along pretty well with MySQL and no hinderance from the GPL there.<br />
<br />
There has yet to appear a column oriented database partner for Postgresql, and Postgresql is under the sort of license which Puppet has just switched to in order to "enables far more partnerships"<br />
<br />
If somebody does a fork of Puppet from the last GPL point, then I'm sure there will be howls of protest.<br />
<br />
Big question for puppet is whether a well funded commercial rival might enter the market, if it did happen would they take the GPL codebase, and try and take out puppet, whilst sharing changes, or would they take the Apache codebase, and start looking at what value added features they might add, that could be patented in an exclusive way?<br />
<br />
<br />
<b>How do I sell my GPL software, surely my competitors can just copy it?</b><br />
<br />
If what you are working on is a simple shopping cart with a few thousand lines of code, then yes your competitors will easily copy what you have, and produce an equally saleable variant.<br />
<br />
If you answered yes above, then you might want to ask yourself is a couple of thousand lines of code really a saleable and 'protectable' innovation. Might be that neither you or anyone else out there could actually sell the thing, in sufficient numbers for it to be viable?<br />
<br />
Be honest. It might be a great little project, however few of those little projects could actually persuade thousands of folks to part with money willingly.<br />
<br />
<span style="font-size: x-small;">( On Windows and Mac desktop systems, there has been a history of freeware. Not free to distribute or contribute to, but free as in zero cost. Those freeware cds were mostly programs that were great little ideas, but not a saleable proposition. )</span><br />
<br />
If you are unsure then set aside £1000 and pay for two things:<br />
<ol>
<li>Small market research exercise via social media</li>
<li>Group of physically present test subjects, who are willing to install the thing and give honest feedback.</li>
</ol>
But £1000 is a lot? Not if you are seriously planning to make a business from selling software. Your legal costs in the first two years, from selling software, would I think easily exceed this.<br />
<br />
<br />
Even without access to the code, the functionality is likely to be reproducible by an independent developer with a couple of weeks tops.<br />
<br />
If you are talking about Red Hat Linux, which has a codebase of which a significant part is GPL licensed, then that is different. Because of the sheer scale of the product (lines of code), you have something that really is saleable and protectable, and that is your experience, your brand, your support, and rolling them all together, the recognisable product known as 'Red Hat Linux'<br />
<br />
<i>But CentOS just copied Red Hat?</i><br />
Yes and No. The saleable brand of Red Hat includes all those things I just mentioned, and is not simply the bare code on a cd.<br />
<br />
<i>But Oracle just copied Red Hat with Unbreakable Linux?</i><br />
Yes and No. In Unbreakable Linux they copied Red Hat code as part of a very specific Application Stack, and do not provide support for the complete range of tasks and workflows that a regular business user of Red Hat might be able to use / utilize.<br />
<br />
By doing this they have sliced off whole areas of the Red Hat brand as 'out of scope' for their support. That has provided some success because of this narrow focus.<br />
I could make a whole article about Red Hat versus Unbreakable Linux, but I'll reiterate what I said and move on...Yes and No.<br />
<br />
Here is a question for you....<br />
"Did CentOS or Unbreakable Linux have an easier or harder time of the copying exercise because of GPL"<br />
<br />
My opinion: License was irrelevant.<br />
<br />
The question of GPL becomes more interesting if CentOS or Unbreakable Linux tried to compete directly with Red Hat by attempting to derive and build upon Red Hat codebase, by say adding a few million lines of code to the kernel and important system routines.<br />
<br />
Neither of these things has happened.<br />
<br />
No reason why it could not happen, however the 'challenger' would have to be 'better' than Red Hat, and that is no mean feat.<br />
<br />
<br />
<b>How do I sell my Apache 2.0 software, surely my competitors can just copy it?</b><br />
<br />
See the first three paragraphs of the previous section.<br />
<br />
Licensing is playing no part in this question, it really is firstly about whether you truly have something that you can build a sustainable business around.<br />
<span class="Apple-style-span" style="font-size: x-small;">( A few thousand lines is just not going to cut it, regardless of whether you license GPL, Apache 2, or keep it hidden in a safe! )</span><br />
<br />
What your competitors might be able to do if the code is Apache 2.0 is wrap it up and pass it off as their own, by submitting to a smartphone app store. It does happen!<br />
<br />
But I digress, lets say that your product is a significant codebase, say 10 million lines of code.<br />
<br />
Perhaps it is the Apache server itself?<br />
<br />
Does Apache 2.0 license prevent some other company from coming along, wrapping that code up and calling it Cherokeeee Web Server.<br />
<br />
Some companies in fact probably do similar things - I am just guessing here that IBM http server is probably Apache rebadged (I might be mistaken)<br />
<br />
Why does Apache not just go commercial and sell it's software?<br />
The history and licensing decisions made previously have provided an ethos which would be difficult for the Apache foundation to now change.<br />
<br />
Fact is that IIS which is Microsoft's take on web serving, is hardly a cash cow, so reality also says that web serving (as a portion of the corporate stack), is not a profitable segment to target anyway.<br />
<br />
Now OpenOffice is being made available under an Apache license and LibreOffice under an LGPL3 license.<br />
<br />
Neither makes a difference to the end users ability to give a copy on a usb stick to a friend - perfectly legal, great way to share a good piece of software with a pal.<br />
<br />
So why the distinction? IBM market a free software suite as 'Symphony', and want to continue to 'pull' changes contributed by the open source community, but without engaging with the LibreOffice folks. There is much speculation as to why that might be, however I leave that as a research exercise for the reader.<br />
<br />
<br />
Does Apache 2.0 or LGPL3 make any difference to IBM ability to rebrand? Not really, however LibreOffice is something that IBM (and Oracle) see as an organisation that might undermine their attempts, to dominate a business channel (Non-Microsoft Office)<br />
<br />
The reaction: Undermine LibreOffice by creating a split license situation, and attempt to slow the acceptance of LibreOffice.<br />
<br />
Neither Apache 2.0 nor a GPL license make any difference to the Office example above - that is just corporate shenanigans ... license switching to disrupt a new competitor (LibreOffice) before it can develop a sales channel of it's own.<br />
<br />
But one day I might be the IBM or Oracle? Well you might be, but more likely is that you will make a successful business selling to SME's, and shifting several hundred thousand licenses - <u>in direct competition</u> to IBM and Oracle.<br />
<br />
You will likely be on the receiving end, of similar attempts to disrupt your sales channel by the big corporates. <br />
<br />
Here you need to think about software licensing as a 'protection' of you business, not from the consumer (EULAs and all that garbage), but from the sharks further up the food chain.<br />
<br />
Reread your preferred license, and think about it, from the point of view of your own business success, and how your OSI license, might help you deal with threats from larger players.<br />
<br />
Here your concerns will go beyond software licensing, and will take in branding, marketing, patents, access to markets and other concerns.<br />
<br />
Piece of advice: Stay away from any sort of custom license. Choose GPL or Apache 2.0 and run with it. Any sort of custom license may well open you up to:<br />
<ul>
<li>The slow drip drip of fees to law firms, as the market challenges the custom clauses you have created. Probably seemed a great idea at the time, but long term, those custom clauses are just a law firm money sink.<br />
</li>
<li>Disruptive moves by the larger competition. The top ten frequently used licenses from OSI including GPL and LGPL and Apache 2.0 have clauses that were carefully drafted over several years, and have been tested in the market.</li>
</ul>
<br />
<b>How do I partner with Commercial companies - do I have to change my license?</b><br />
<br />
Not at all.<br />
<br />
If you are GPL, then some of your partnerships will be formed on a sharealike understanding.<br />
<br />
If you are GPL, then you can make whatever alternative licensing arrangements you like with partners who are wanting to take a codebase, and work on it without contributing back changes.<br />
<br />
The phrase is "Dual licensing"<br />
<br />
You can go further and "Triple license", it really is up to your company.<br />
<br />
The important thing is not to switch from GPL. When you do that you create a future cul-de-sac into, which an IP aggressor can push the project after a takeover.<br />
<br />
Worst case: You are taken over by Oracle and everything seems rosy for a couple of years, then the closure creep begins to wear on you, and you get tired of your once great product being just an 'up sell' opportunity to a proprietary product.<br />
<br />
You have spent a decade working on the thing. Within two years the takeover has dead ended your project. By switching away from the GPL a couple of years prior to the sale, those two years of building (now kept private) are lost to you and everyone else.<br />
<br />
Do you work on that software ever again? Do you give up on software engineering altogether as you cannot see yourself investing a decade in something new?<br />
<br />
The things I have referred to in the past three paragraphs are real. Do some reading up about the career moves of the leading Java and MySQL folks, during and after, the Sun to Oracle sale.<br />
<br />
<br />
<b>I am wanting to partner with Puppet, but somebody suggested that this GPL thing is dangerous?</b><br />
<br />
Do your research. Consult as widely as you need to.<br />
<br />
You talk to some fella in the queue at Starbucks, and he mentions that GPL is bad and Apache 2.0 is better.<br />
<br />
I repeat ... Consult as widely as you need to. Try a <a href="http://www.softwarefreedom.org/">software licensing expert</a> if in doubt.<br />
<span class="Apple-style-span" style="font-size: x-small;">(If it costs you £500, it really is small change for a partnership, where you intend to work on several hundred thousand lines of code)</span><br />
<br />
When you consult, you will understand that a key question is 'sharealike'.<br />
<br />
Puppet make their code freely available for partners and the wider community to distribute and modify. Do you want to do that?<br />
<br />
Do you want your partners to be compelled to 'return the favour', and make available the 5,000 lines of enhancement they just added?<br />
<br />
A commercial license arrangement in addition to GPL give you both ways of partnering - pay me and take my codebase with no forward requirement to share your enhancements, or take the GPL codebase and 'sharealike'.<br />
<br />
A commercial license arrangement (in addition to GPL) also *might* be expected to include warranty and indemnification.<br />
<br />
If your partner indicates that they want (1)Warranty and (2)Indemnification included in the commercial license...<br />
Then (1) means people, time, and quality business processes and (2) means legal counsel and possibly a commitment, by your company, to absorb some of the legal threat a partner may be subject to, as a direct result of using and distributing your original codebase.<br />
<br />
Just to point out one benefit of the GPL from the perspective of a future partner.<br />
<br />
**A commitment to non-exclusive patent granting.**<br />
<br />
But how could this be a benefit for me as a partner?<br />
<br />
As the only partner, you probably care little about the two way non-exclusive patent handshake you are party to through the GPL.<br />
<br />
However I give an example of the situation under Apache 2.0 which has no bi-directional non-exclusive patent right clause.<br />
<br />
I am Puppet, and I develop software P. I then partner with you (Apache 2.0) and you develop your own P+. Another partner agreement is made (Apache 2.0) and another product P++ is born.<br />
<br />
The P++ vendor is an IP aggressor and intends to use the '++' features as a market lockout. The company files a bundle of patents on the '++' technology they added, develops the market to want those '++' features.<br />
<br />
Nothing too bad just yet.<br />
<br />
But then the patent stick is pulled out. As a 'market aware' partner you mistakenly got caught up in adding some of those features, which IP aggressor patented, and you are now the target of a patent lawsuit.<br />
<br />
Three boats set out on the river...the original and two partners.<br />
<br />
The original has now become a little less relevant due to market developments.<br />
The 'P+' partner (that's you) has been killed off by the deliberate patent plan of the 'P++' vendor.<br />
<br />
A non-exclusive patent clause now probably sounds like a good idea in retrospect.<br />
<br />
A non-exclusive patent clause is not to be feared as a partner, if you genuinely build robust reliable software that is better than the competition (P++), then people will buy it. It does not need patents to be a better product. It needs skilled developers and lots of commitment.<br />
<br />
<i>But Oracle will just take my additions and market that on top of their product?</i><br />
<br />
Are they marketing a 'better' product than you by doing that?<br />
No. And your customers can see just that.<br />
<span class="Apple-style-span" style="font-size: x-small;">( Going back to the Unbreakable Linux question, Oracle in that instance are not offering a 'better' product, they are addressing a very specific appliance segment, one which is not, just now, targeted explicitly by Red Hat )</span><br />
<br />
But what about the original project, should they be rewarded for not adding features the market wants?<br />
<br />
If the P++ vendor has really built an excellent, and significant set of features in the ++ additions it made, then it will be first to market, and associated with those excellent features.<br />
<br />
There is little reward to just copying exactly what another vendor has done, especially if that vendor has an active marketing campaign.<br />
They are associated with being first to market with the ++ features, and make the sales.<br />
<br />
However if the ++ features are an unstable pile of mush, then the original project could theoretically rework the codebase and implement it better.<br />
<br />
Who wins there? The market and the customer.<br />
<br />
Just to put things back into terms of the boats on the river analogy...<br />
<br />
A bi-directional non-exclusive patent right, ensures that none of the partners can sink the boats of the other using patent aggression.<br />
<br />
This is why Oracle and Microsoft do everything they can to discourage GPL adoption, it deprives them of an element of their corporate strategy ...<br />
<br />
... To kill decent rival products by using patent aggression, to scare development teams away from projects, using patentable 'value added' additions, and private patent agreements.<br />
<br />
Whilst I do not agree with everything that Brian Gentile of Jaspersoft say, I quote an extract here with my own highlighting:<br />
<blockquote>
They would rather have standard, commercial terms around the software and its use. By going to a commercial version, customers have a commercial license which includes the <b>indemnification</b> and <b>protection</b> they want to go along with it.<br />
<br />
The third reason is <b>professional support</b>. The forums and the support that you get from working with the Jaspersoft community are pretty robust, but if your use of Jaspersoft is relatively mission critical, you probably want the comfort of knowing that you have a <b>support team that’s very intimate with the code</b> and available to you 24/7.</blockquote>
I have touched on some of those highlighted points previously.<br />
<br />
I am going to interpret the use of the word <b>indemnification</b> to mean warranty, something which MySQL AB used to offer in it's commercial licensing, to meet that requirement.<br />
<br />
Brian's use of the word <b>protection</b> should have been clarified further by the interviewer, or Brian himself.<br />
I will not speculate further, other than saying this, could be just another way of saying 'security updates', or could be closer to what the Oracle and Microsoft camps, mean by <b>protection</b>.<br />
<br />
<br />
<b>Oracle and GPL:</b><br />
<br />
I could take aim at Oracle regarding the Oracle / Google android situation, however I reserve judgment on that issue. It is complicated and has a ream of in depth articles already.<br />
<br />
But surely Oracle contributes to Open Source, and under the GPL license?<br />
<a href="http://oss.oracle.com/projects/btrfs/">Btrfs</a> is a good technology, and the license is GPL<br />
<br />
Contributing to one project under GPL, whilst a promising start, does not 'define' Oracle.<br />
<br />
Since taking over Sun, Oracle have taken many 'Free and Open Source' projects, and, thrown out anything, which cannot be seen to contribute to their proprietary stack.<br />
Rather than embrace all those developers, Oracle has chosen to reassert it's 'type', rather than adapt.<br />
<br />
<br />
<b>Microsoft and GPL:</b><br />
<br />
A company even less able to adapt than Oracle, pursuing tired business tactics to try and turn back the clock to the 90s.<br />
<br />
Rather than drone on here, just do a <a href="http://www.google.com/search?q=GPL+microsoft+app+store">websearch for GPL microsoft app store</a>, to read up on opinion, as to why Microsoft, is targeting the GPL, as one of the few OSI-approved licenses which it prevents from entering it's smartphone app store.<br />
<br />
By comparison I quote from the Wikipedia section '<a href="https://www.wikipedia.org/wiki/GNU_General_Public_License#Legal_barrier_to_app_stores" rel="nofollow" target="_blank">Legal barrier to app stores</a>' and the portion related to Ubuntu app store<br />
<blockquote class="tr_bq">
In other cases, such as the <a class="mw-redirect" href="https://www.wikipedia.org/wiki/Ubuntu_App_Store" rel="nofollow" target="_blank" title="Ubuntu App Store">Ubuntu App Store</a>, proprietary commercial software applications <i>and</i> GPL-licensed applications are both available via the same system</blockquote>
<br />
<br />
<br />
<br />
<span style="font-size: x-small;"></span>Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-35056567617192370682011-04-13T15:36:00.006+01:002018-02-28T20:14:13.855+00:00python - roots in teaching, now in enterprise . <br />
How suitable is Python for teaching folks who have no programming experience?<br />
<br />
It is just this situation that prompted Guido Van Rossum to create Python.<br />
<br />
Without wishing to paraphrase (see links at the end and form your own comments), I draw out three points:<br />
<br />
<ol>
<li><b>Readability counts.</b></li>
<li>The language should be a little familiar in style to Mathematical constructs / thinking.</li>
<li>Resist the temptation to add new constructs all the time, and brevity is not everything (see 1)</li>
</ol>
<br />
Such ideas might predate Ruby, and some other <a href="http://www.google.com/search?q=ascii+symbol+overload+programming+one+liner">languages which make more use of keyboard symbols</a>.<br />
<br />
<br />
I like Ruby and I have programmed in Ruby.<br />
However choosing Ruby as my main language, might well mean me choosing less of (1) and (3) above.<br />
<br />
I am not learning my first language, but those who are, might benefit from having to pick up fewer symbols.<br />
[ They may already be full of symbols having just left a Mathematics class :) ]<br />
<br />
<br />
<b>How suitable is Python for learning - access from any Computer?</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZQPcvFgnvaD5Ey234ezgwoxlsdpfhJTR23Js27xjBO3kSWsdul8iUklI5TIMMxzBkWpWHpfJrpVUhNRFfiGTwi5HjtTyNYLHi7tYxaNK4vxgeXIrpMiEyzu9FNZwY1x4tYi9QTDbYDhE/s1600/pythonInteractive__2011simpleWhileLoop.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZQPcvFgnvaD5Ey234ezgwoxlsdpfhJTR23Js27xjBO3kSWsdul8iUklI5TIMMxzBkWpWHpfJrpVUhNRFfiGTwi5HjtTyNYLHi7tYxaNK4vxgeXIrpMiEyzu9FNZwY1x4tYi9QTDbYDhE/s1600/pythonInteractive__2011simpleWhileLoop.jpeg" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Here I have shown a short while loop example, that is run online.<br />
<span style="font-size: x-small;">( Interactive web page at: <a href="http://people.csail.mit.edu/pgbovine/python/tutor.html#mode=edit">http://people.csail.mit.edu/pgbovine/python/tutor.html#mode=edit</a> ) </span><br />
<br />
Python is easily to install on any computer.<br />
<span style="font-size: x-small;">(If the school admin can install a browser, then they could certainly visit <a href="http://www.python.org/download/">http://www.python.org/download/</a> and click once the download is complete. )</span><br />
<br />
Having seen an example of Python code above, this might be a good opportunity to show a slide from Guido himself (2006):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUyNYJaklzbbiq49BWegtad0bEBPWb0s0Rd9RrkaMqkvbZHEntbpQo6-vg3JF36LygYx0dj-FM5BtudRU-OLYtHQs_yf88F1dXt_vDr6DnhAteKOKjb_kNxIGoUJsUzp7yMF21q0o0Fkg/s1600/readabilityAndPython__2006vanRossum.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="395" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUyNYJaklzbbiq49BWegtad0bEBPWb0s0Rd9RrkaMqkvbZHEntbpQo6-vg3JF36LygYx0dj-FM5BtudRU-OLYtHQs_yf88F1dXt_vDr6DnhAteKOKjb_kNxIGoUJsUzp7yMF21q0o0Fkg/s640/readabilityAndPython__2006vanRossum.jpeg" width="640" /></a></div>
<br />
Now look again at the code in the Fizz Buzz example above and ask:<br />
<ul>
<li>Does it seen natural? Is there some feel similar to how we might express the recipe in natural language?</li>
<li>Does it require the use of plenty of symbols / constructs which a school age child would need to learn new?</li>
</ul>
I think it stands up fairly well.<br />
<div style="text-align: left;">
<span style="font-size: x-small;">(Explaining that elif is an abbreviation for 'else if' is one thing I see as new learning.)</span><br />
<span style="font-size: x-small;"><br />
</span></div>
<pre class="prettyprint lang-py">count = 1
while (count <= 100):
if (count % 3 + count % 5 == 0):
print "fizz-buzz"
elif (count % 3 == 0):
print "fizz"
elif (count % 5 == 0):
print "buzz"
else:
print count
count += 1
</pre>
<br />
<br />
<b>A Simple IDE for Python - no install required:</b><br />
<br />
Look again at the image above for the fizz buzz example, you might spot the highlighting. That <a href="http://people.csail.mit.edu/pgbovine/python/tutor.html#mode=edit">online page</a> at Mit.edu, does simple stepping, that a learner can follow.<br />
<br />
What is not visible in my crop, is the box which shows the internal value of the variables as things progress. Seems a good teaching aid, and no install required.<br />
<br />
Visit the <a href="http://people.csail.mit.edu/pgbovine/python/tutor.html#mode=edit">Mit.edu page</a> yourself and paste in my code above, or some variant, and step it through using the buttons. Works well :)<br />
<br />
<br />
<b>Pythonic programming and fizz buzz:</b><br />
<br />
The intention in this article is to act as an introduction, and provide a very simple example.<br />
<br />
How much rigour about Python style, you put into your teaching is up to you.<br />
<br />
<span style="font-size: x-small;">( It is not my intention here, to aim to be 'Pythonic', or provide a perfect coding example. If you want that, then there is a link at the end of this article. )</span><br />
<br />
<br />
<b>Python as part of college "Introduction to Programming":</b><br />
<br />
<br />
Teaching College students programming is a little different from teaching school age.<br />
<br />
Philip J Guo makes some good points in <a href="http://www.stanford.edu/%7Epgbovine/python-teaching.htm">this article</a>, about why Python may be the right choice for College.<br />
<br />
<br />
<b>Notes and Further Reading:</b><br />
<br />
The final few links given below are provided as a further consideration, some might argue a minor consideration. Programming languages that involve more [ non-natural ] constructs, will perhaps present greater challenges, to people who have some difficulty absorbing new symbols and associating those symbols meaningfully. <br />
<ul>
<li>Python Programming Philosophy (<a href="http://www.python.org/dev/peps/pep-0020/">Prose</a>) [ python.org/dev/peps ] </li>
<li>Python Programming Philosophy (<a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29#Programming_philosophy">Summary</a>) [ wikipedia.org ] </li>
<li>Python <a href="http://people.csail.mit.edu/pgbovine/python/tutor.html#mode=edit">Interactive Page</a> of Philip J Guo [ csail.mit.edu] </li>
<li><a href="http://www.google.com/search?q=pythonic+fizz+buzz">Pythonic Fizz Buzz</a> - for those more advanced [ google ]</li>
<li><a href="http://www.stanford.edu/%7Epgbovine/python-teaching.htm%20">College "Introduction to Programming" and Python</a> [ Standford University ]</li>
<li><a href="http://www.stanford.edu/class/cs242/slides/2006/python-vanRossum.ppt">"Design of Python" talk as part of CS242</a> [ Stanford University - Powerpoint ]</li>
<li><a href="http://www.google.com/search?q=ascii+symbol+overload+programming+one+liner">ASCII explosion regarding programming languages</a> [ google ] </li>
<li><a href="http://en.wikipedia.org/wiki/Dyslexia">Dyslexia</a> [ Wikipedia.org ] </li>
<li><a href="http://www.arp.sprnet.org/curric/Dept_Chairs/mathematics_and_dyslexia.htm">Mathematics and Dyslexia</a> [ sprnet.org reprinted ]</li>
<li>Compact (less readable) <a href="https://cloud.sagemath.com/projects/aee6f861-c776-4167-86e6-3139bfbb5d49/files/high-five-public.html" rel="nofollow" target="_blank">variant of fizz-buzz</a> on Sagemath cloud </li>
</ul>
Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0tag:blogger.com,1999:blog-4232685199043658241.post-42778937614731016572011-04-06T17:54:00.003+01:002014-07-22T19:48:42.498+01:00Cups - job cancellation - group membership is the keyThere are several printing systems which you might use in Debian, depending on your desktop of choice (Xfce, KDE, Gnome, Lxde, etc)<br />
<br />
If you use <b>cups</b>, then one of the tasks you will want, at some point, is "<b>Job cancellation</b>"<br />
<br />
When this task is first required, I find myself immediately leaping to the following questions:<br />
<br />
<blockquote>
<i>What port is the cups 'admin interface' running on so I can open the admin web page in a browser</i>?</blockquote>
<br />
...and...<br />
<br />
<blockquote>
<i>Do I enter admin / root where the authentication prompt asks for "User Name"</i>?</blockquote>
<br />
<br />
...and...<br />
<br />
<blockquote>
<i>Where in /etc/ can I find the password for the admin / root user</i>?</blockquote>
<br />
...and lastly I am probably about to head out to websearch for 'cups admin default password'<br />
<br />
<br />
Turns out <i>I am asking all the wrong questions</i> and wasting my time.<br />
<br />
<br />
<b>How to do Job cancellation in cups</b>: <br />
<br />
( should not require a 'sign-in' - the key is <b>group membership</b> )<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLY_mEzRaMppT32oAGFSs16yua3NxKqa7DYgZn-5_f17LQ6m3KPBscJMPMCWhyJ2fZJErlKgv9U_E_bfUXLsrxZw_PNRAXY1MPJ585L_7fKWVD4LB7fHaS90-F-oGjoBJpqVv7Lmt4ZfQ/s1600/cups__2011addUserToLpadminGroup.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLY_mEzRaMppT32oAGFSs16yua3NxKqa7DYgZn-5_f17LQ6m3KPBscJMPMCWhyJ2fZJErlKgv9U_E_bfUXLsrxZw_PNRAXY1MPJ585L_7fKWVD4LB7fHaS90-F-oGjoBJpqVv7Lmt4ZfQ/s1600/cups__2011addUserToLpadminGroup.jpeg" /></a></div>
<br />
On a multi-user system, not all users will necessarily have access to a printer.<br />
<span style="font-size: x-small;">( It could be that your "Industrial Colour Laser 9000" is not something you want every team in the office to be able to access )</span><br />
<br />
If your OS of choice has a 'server distribution' and 'desktop distribution' (Ubuntu perhaps or the Red Hat / Fedora combination), then some might feel it is appropriate for the 'desktop' version to have <i>automatic membership of lpadmin</i>.<br />
<br />
Once your username is a member of <b>lpadmin</b>, then you can proceed to this screen:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwK6d_PDlwX31zqLGabFoSOlTAfBPYrDhEvCLL_OTbQ1NP-yqhLhwsYXaKWsgq7iXzTdjIgm0NXLxLKYPp_RcQh1pIWSgzmRbX7TA5Q4N6omDvnvGqwuw-0c4jYBgC9V0xRxhjQPJlp48/s1600/cupsListJobs__2011port631.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwK6d_PDlwX31zqLGabFoSOlTAfBPYrDhEvCLL_OTbQ1NP-yqhLhwsYXaKWsgq7iXzTdjIgm0NXLxLKYPp_RcQh1pIWSgzmRbX7TA5Q4N6omDvnvGqwuw-0c4jYBgC9V0xRxhjQPJlp48/s1600/cupsListJobs__2011port631.jpeg" /></a></div>
<br />
Which will list the queued jobs and offer you the option to 'Cancel' for each job in the queue*.<br />
<div style="text-align: center;">
<span style="font-size: x-small;">( Url is http://localhost:631/jobs/ which you can bookmark in your browser )</span></div>
<br />
*Note: you <u>might have to log out & log back in again</u>, in order for the new group membership to take effect, then afterwards access<span style="font-size: small;"> </span><a href="http://localhost:631/jobs/"><span style="font-size: small;">http://localhost:631/jobs/</span></a><br />
<br />
<br />
GNU / Linux has several options for backend printing systems, as I hinted earlier.<br />
<br />
If you prefer a different printing backend, then, for Xfce, the settings here:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguNg-eXKfU1ggfxsmHf7fPwU5M4hl_sNRWYoWn94DMTjTYLpero0J2WtkmrrmEFL2Q4_MLF9ygbJODuwzA_Ag_WsilT10JiqSKhY_WBg6r9-gKqIlbjiSyFnOkkauTnyVvyoDxcANbrZ4/s1600/xfceSelectBackendPrintingSystem__20110406cupsOrAlternative.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguNg-eXKfU1ggfxsmHf7fPwU5M4hl_sNRWYoWn94DMTjTYLpero0J2WtkmrrmEFL2Q4_MLF9ygbJODuwzA_Ag_WsilT10JiqSKhY_WBg6r9-gKqIlbjiSyFnOkkauTnyVvyoDxcANbrZ4/s1600/xfceSelectBackendPrintingSystem__20110406cupsOrAlternative.jpeg" /></a></div>
<br />
...and here ...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiORLb3d_yu9TtngV258wITAAmdFTDj9JM_gI33lLy3YcCuEFsmRXX_0f_O8UX_hFidqQtIwSw_e9gczAc8f-lYTAI57tdb8FWJyNZbPTp1EIVlOkX1mclK3PXmQ1uLZJK6KU46ia6Rn5E/s1600/xfceSelectBackendPrintingSystem__20110406selectionShows2possibleInclCupsAndBSD-LPR.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiORLb3d_yu9TtngV258wITAAmdFTDj9JM_gI33lLy3YcCuEFsmRXX_0f_O8UX_hFidqQtIwSw_e9gczAc8f-lYTAI57tdb8FWJyNZbPTp1EIVlOkX1mclK3PXmQ1uLZJK6KU46ia6Rn5E/s1600/xfceSelectBackendPrintingSystem__20110406selectionShows2possibleInclCupsAndBSD-LPR.jpeg" /></a></div>
<br />
...will help you switch to an alternative.<br />
<br />
<br />
<b>Notes and Further reading:</b><br />
<br />
Cups is not universally liked, and different GNU / Linux distributions use more or less of it to their taste.<br />
<br />
Quoting from a <a href="https://osu.redhat.com/content/courses/rha130-50-trial1/tag_sysadmintools/tag_lessons/tag_cupscfg/tag_discussion">Red Hat printing tutorial</a>, two advantage of cups are:<br />
<br />
<ol>
<li>Available on all versions of Unix.</li>
<li>Can be accessed from a terminal using a text based web browser (such as links).</li>
</ol>
Personally I quite like the idea of <a href="http://localhost:631/">http://localhost:631/</a> in a browser for printer control, seems simple and it works. So I do not mind a quick manual group add command, in order to set things up my end :)Garyhttp://www.blogger.com/profile/17485264462243138001noreply@blogger.com0