The mysteries of anaconda and kickstart

Problem

At work, I was trying to get a node installed remotely through kickstart such that I can create the partition table in a specific order. Unfortunately anaconda does not allow us to do that, and you could get disks partitioned not necessarily in the same order. i.e. I wanted the below

  • partition 1 == 10M
  • partition 2 ~ 50M with raid 2 across all 8 disks, with 6 Hot Spares
  • Partition 3 ~ 50G with raid 5 across all 8 disks, with 1 Hot Spare
  • Partition 4 everything else

Continue reading “The mysteries of anaconda and kickstart”

The wonders of gitlab

This is probably my first proper blog post, so here goes.

Over the last few years, I have accumulated many git and svn repositories for work and personal projects, and have always looked for a web GUI, and source code management, that all fitted nicely. In this time I have used SVN with webdav, and websvn which worked really well, but unfortunately died to death, as multi-user integration wasn’t there, and therefore colleagues in my team could not effectively contribute to the projects.

Continue reading “The wonders of gitlab”

ubuntu/debian local issues

If you ever have an issue similar to below on debian or ubuntu

svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is en_GB.UTF-8
svn: warning: please check that your locale name is correct

then run the following command to fix the problem, obviously choosing your locale, in my case for debian wheezy, I chose 122, which was `en_GB.UTF-8`

dpkg-reconfigure locales

Self-signed Certificate

First create a Private Key to sign the certificate

openssl genrsa -des3 -out server.key 1024

Create CSR

openssl req -new -out arif-ali.csr -key server.key \
-subj "/C=GB/ST=South Yorkshire/L=Sheffield/O=Example Inc/OU=Web Dept/CN=example.com" \
-out server.csr

Decrypt the private key

cp server.key server.key.org
openssl rsa -in server.key.org -out server.key

Sign the Certificate with the private key

openssl x509 -req -days 365 -in server.csr -signkey server.key \
-out server.crt

SSH Fingerprint

You can generate a fingerprint for a public key using ssh-keygen like so

ssh-keygen -lf /path/to/key.pub

Concrete example (if you use an RSA public key):

$ ssh-keygen -lf ~/.ssh/id_rsa.pub
2048 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff /Users/username/.ssh/id_rsa

Prime Factors

A small piece of bash script that will calculate the prime factors, given a number

factors()
{
    num=$1
    sqrt=`echo "sqrt($num)" | bc`
    for (( i=$sqrt;$i>=2;i-- ))
    do
       if [[ `echo $num % $i | bc` -eq 0 ]]
       then
          echo "$i `echo $num/$i | bc`"
       fi
    done
}

Smarties Halaal/Haraam

Here is a letter I got back from Nestle with respect to suitability of Smarties

Thank you very much for your email.

In answer to your enquiry, Smarties are not on the Muslim list because they are not suitable for a muslim diet. The foods on the list you have received are foods that are suitable for you to consume. The Smarties in the McFlurrys are standard Smarties and none of them are suitable for Muslims or vegetarians. If a product is not listed on the information provided, then it is not suitable for you to consume.

We no longer use riboflavin, carminic acid, copper complexes of chlorophyllins, vegetable carbon or mixed carotenes in the classic and mini Smarties. In the new Smarties we are making use of ‘colouring foodstuffs’. These are ingredients which may impart colour when added to a food product and are typically concentrates of fruits or vegetables, but may also be cereals, spices or other foods. Importantly, they retain the essential characteristics of the food they originate from.

The specific ‘colouring foodstuffs’ used in Smarties are:

  • > Black carrot (Daucus carota L.)
  • > Hibiscus (fruit of Hibiscus sabdariffa)
  • > Lemon
  • > Radish (Raphanus sativus)
  • > Red cabbage (Brassica oleracea var. capitata rubra)
  • > Safflower (flowers of Carthamus tinctorius L.)
  • > Spirulina (Arthrospira).

In respect of the vegetarian status of Smarties, the milk chocolate contains whey powder. Whey is manufactured from milk using either animal rennet or vegetarian rennet. Smarties contain animal rennet.

Thank you again for taking the trouble to contact us. We are grateful for the interest you have shown in our company.

Continue reading “Smarties Halaal/Haraam”