one-step self-signed SSL certificate

Posted on May 31st, 2005 in , by jud || Add A Comment

Create self-signed certificates is useful when managing apache and dovecot imap servers. I have always found it to be a pain to create the certificates. Here’s simple instructions for creating one.

In a nutshell,

openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout -out

You can then use the file above in apache with the following two lines

SSLEngine On

In my case, I created a separate cert and private key:

openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout private/ -out cert/

and installed them so that dovecot (and thunderbird) would use them. I added the year in the cert UO field.

Add A Comment

Scripting Photoshop: Text basics

Posted on May 11th, 2005 in , by jud || Add A Comment

I’ve been working with photoshop javascript scripting, which is relatively simple. For example, as an experiment, I’m in the process of automating the way I frame images for the web. This little script is step one in the processes, and provides a bit more detail about manipulating text. Copy the code to a file called Sign.js, and place this file in your *photoshop*/Presets/Scripts folder, and (after restarting photoshop) you can run it from the File->Scripts menu as “Sign”.

Note: I tested this code using Photoshop CS. It should work on CS2, and on Photoshop 7 with the scripting component installed, too.

// Sign.js - put your name in the lower right corner of the document
// preserve the existing settings before changing them
var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;

// set our units to what we expect
app.preferences.rulerUnits = Units.PIXELS;
app.preferences.typeUnits = TypeUnits.POINTS;

// creates a new document, 400x600 pixels @ 72DPI, with a title "Hello World"
var docRef = app.documents.add( 400, 600, 72, "Hello, World!");

app.displayDialogs = DialogModes.NO

// Create a text color (red)
var textColor = new SolidColor; = 255; = 0; = 0;

// Create the text layer that we'll manipulate
var artLayerRef = docRef.artLayers.add();
artLayerRef.kind = LayerKind.TEXT;

var textItem = artLayerRef.textItem;
textItem.justification = Justification.RIGHT;
textItem.font = "Papyrus"; // this is a Mac default font. Try "Arial" for cross-platform compat
textItem.contents = "Jud Dagnall";
textItem.size = 10;
textItem.color = textColor;
textItem.position = Array(400, 575);

// The next two steps aren't terrible relevant, but are part of the greater plan :)
// flatten the image
// make the background layer edit-able,
docRef.layers[0].isBackgroundLayer = false;

// clean up and restore settings
app.preferences.rulerUnits = strtRulerUnits;
app.preferences.typeUnits = strtTypeUnits;
docRef = null;
textColor = null;
newTextLayer = null;

Add A Comment