rulururu

post Installing custom programming font

January 31st, 2007

Filed under: Code, Linux, Operating Systems, Ubuntu — Brenton Alker @ 16:45

Every so often I find a new font that I want to use for something on my system.

This time it was a new programming font in gvim. The font I was interested in is ProFontI use this font at work, and it is far superior to the default terminal font.

But ever time I go to install a new font, I need to look up how. It’s one of those things that I don’t do often enough for it to be worth remembering I guess.

So here it is, for my reference… Ok, you can read it too I suppose.

This applies to truetype fonts but, as far as I am aware, the process should be similar, if not the same, for other font types.

The first step is to obtain the font files and place them into one of your system font folders.

Your font folders can be found by:

grep FontPath /etc/X11/xorg.conf

I decided to use /usr/share/fonts/truetype/custom/ so after copying the .ttf file(s) into there.

sudo cp newfont.ttf /usr/share/fonts/truetype/custom/

It was a simple matter of running:

sudo fc-cache -f

to update the fonts and they were available to use where I wanted them (in Vim).

post Generate SSL cerificate for Courier IMAP server

January 20th, 2007

Filed under: Debian, Linux, Operating Systems — Brenton Alker @ 02:03

My SSL certificate for my mail server had been expired for a few weeks now. When I finally got a round to installing a new one, I discovered the script I used to use to generate them missing. Instead I had to call OpenSSL directly. Luckily, the line wasn’t too hard to find.

After filling in the requisite fields in the configuration file — The most important being the "CN" field, which should contain the FQDN of the mail server.

/etc/courier/imapd.cnf:

RANDFILE = /usr/lib/courier/imapd.rand
[ req ]
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type
prompt = no
[ req_dn ]
C=AU
ST=QLD
L=Brisbane
O=Courier Mail Server
OU=Automatically-generated IMAP SSL key
CN=mail.example.com
emailAddress=postmaster@example.com
[ cert_type ]
nsCertType = server

Then generate the certificate itself with this incantation:

/usr/bin/openssl req -new -x509 -days 365 -nodes \
-config /etc/courier/imapd.cnf -out /usr/lib/courier/imapd.pem \
-keyout /usr/lib/courier/imapd.pem

Got rid of the annoying "This servers certificate is exipired" messages in my MUA anyway.

post Search for the Holy Grail (Not Really)

January 12th, 2007

Filed under: Code, Ruby — Brenton Alker @ 16:17

Back from the Christmas/New Year festivities, I have been playing around (at a very basic level) with a few programming languages, with the goal of learning something new. All of the languages I have been playing with I have looked at in the past very briefly, but never ventured any deeper. This time I intend to pick one and hopefully learn it to a level where is might be useful.

Of the languages I am looking at, none are particularly unusual or oscure, they are all fairly common scripting languages used for web development.

My list so far consists of (in no particular order):

I have chosen these languages because as I said, they are common scripting languages, often used in web development. And I am looking to expand my repetoire. Learning a new language not only teaches the symantics of the language, but programming methods, structures and paradigms that can be implemented in any language.

With that in mind, I have decided to look at Ruby (at least for now).

Deciding to do web development with Ruby invariably leads to Ruby on Rails. Not wanting to get (too) caught up in the hype, I decided to have a look at the raw language first. So, I had a read through the quite unusual (have a look and see) Why’s (Poignant) Guide to Ruby. After sifting through this odd compilation to find the actual useful content (The humour — cartoons, stories and the like — throughout the book make it an interesting read, but maybe not the best reference manual) I had an overview of Ruby and liked what I saw.

After some initial playing around, reading up on the "raw" way of developing web sites in Ruby (raw text and with cgi extensions) I did end up installing rails.

I have experimented briefly with rails in the past, previously though, I had not bothered to learn anything at all about Ruby as a language. So, while the basic functionality of rails, the model/view/controller scaffolding was really impressive (it still is), if I wanted to do anything more adventurous, or if something broke, I was lost.

I am hoping that with a slightly better understanding of Ruby (and a willingness to learn the language this time) I will have more success with rails. If it doesn’t work for me… I’ll try somethign else.

ruldrurd
Powered by WordPress, Web Design by Laurentiu Piron
Entries (RSS) and Comments (RSS)