Ramin Hossaini (blog)

16Feb/10

Turning Archive-log mode on and off

You can check what mode the database is in with:

1
SELECT LOG_MODE FROM SYS.V$DATABASE;

If you do not specify an archive-log location, it will end up going to a directory like $ORACLE_HOME/dbs - which can be quite a mess.
Check where it's going:

1
SHOW PARAMETER log_archive_dest;

It would be good practice to set the location if it doesn’t show one.
To turn archive-log-mode on or off:

shutdown database:

1
2
3
SHUTDOWN IMMEDIATE
STARTUP RESTRICT
SHUTDOWN

Mount the database:

1
ALTER DATABASE MOUNT;

Then issue one of the following:

1
2
ALTER DATABASE NOARCHIVELOG;
ALTER DATABASE ARCHIVELOG;

If the location hasn’t been set yet:

1
ALTER SYSTEM SET LOG_ARCHIVE_DEST = "/ARC_LOCATION";

Then open the database:

1
ALTER DATABASE OPEN;

There might also be archivelog related entries in your PFILE, which you should also make changes to.

16Feb/10

Listing key Oracle Database files

To get a list of all datafiles, redo-log files and control-files, run the following in SQL*Plus (database must be mounted):

1
2
3
SELECT MEMBER FROM V$LOGFILE;
SELECT NAME FROM V$DATAFILE;
SELECT VALUE FROM V$PARAMETER WHERE NAME = 'control_files';

An easier way of displaying your control-files is:

1
SHOW PARAMETER control_files;
Tagged as: No Comments
9Jan/10

Stop WordPress from adding p and br tags

Even without the visual-editor, WordPress has a habit of adding <p> and <br/> tags

Add this to your templates/pages/whatever and it should take care of the problem.

<?php remove_filter('the_content', 'wpautop'); ?>
Tagged as: No Comments
9Dec/09

Create bevelled text

I might be superfluous in my method here, but it works well for me :)

Add some text

Capture00_

18Nov/09

Making ‘Fairy Tales’

This time round, I tried to take more screenshots

Fairy Tales

4Nov/09

Search through files for a string (Linux)

To search a directory recursively for specific text or a string, use:

find . -exec grep "string to find" '{}' \; -print
Tagged as: 1 Comment
30Oct/09

Surrealism “Propaganda”

I had this idea for a couple of days and finally decided to do it yesterday. This was the process (very very roughly)

Step 1: Getting the initial photos

This is the embarassing part. You'll look silly almost no matter what - trying to get a self-portrait in a suitable position that you envision. A camera on tripod, remote control and bounce-flash later though (thanks, I like my bedsheets too):

step1

Got some stock-photography from Pierre on DeviantArt

step1_stock

Step 2: Putting the 2 together

I had to give the photo a bit more room at the top, so I photoshopped some more wall there. With composites, sometimes I'll mask out the individual parts as precisely as I can initially and save the respective masks in my channels. In this case, I put them together first and then masked it all together. I think that's a mistake and I should have masked the subject first (me) then masked the television. Could have saved myself quite a bit of time afterwards.

step2

Step 3: Magic

OK, so I skipped a lot of steps - my bad - I didn't take any screenshots. I was too busy wondering "how the hell am I going to get this to blend". I guess there's always a point in these highly-processed photos where I say "I should stop right now, this is just not working", but I keep on going because it's taken so much effort already. Eventually, there's a point where I say "oh, I might have something here". I suppose that makes it all the more rewarding in the end.

I use a lot of different filters and textures and try to burn-and-dodge a lot.

step3

Step 4: Colouring and painting light

I hate masking and I love "painting-light" and manipulating it. I think that if I actually loved masking, I could have some really amazing work.

At this point, I also did a bit of liquifying and stretched/distorted parts of the photo.

Almost 3 hours later, this was the final shot:

step4

Bear