Monthly Archives: April 2015

One update a day keeps problem at bay

It looks like the last update I did kind of messed with the blog layout. I switched to a new theme, did some update with the layout and it should be back to normal. I’m still working on finding the right balance, I’m not really proud now, things are likely to change again in the near future….

And I just remembered why I closed my previous blog

Roughly 10 years ago, I installed my first blog. After a few months, I decided to close it because the admin burden was too high for me at that time.

It looks that spammer still love to drop random comment and did not learn anything in 10 years. I’ll go hunting for some smart plugin and in the meantime, comments need to be approved before being published.

Using Persistence of Vision on Ubuntu

I’ve been using Persistence of Vision for almost 20 years. By using, I mean thaat I had times when I was pretty intensive users and most of the time where I didn’t touch it for spans of multiple years.

I recently decided to install it on my ubuntu, and there are some caveats that I’ll document here for safekeeping.

Installation: pretty easy

apt-get install povray

Configuration: not so easy

You need to configure it to work easily from command line. The following files are involved :

  • povray.conf, which describes security limitations mainly
  • povray.ini, which defines default behaviour for povray command line.

Both file should be in ~/.povray/3.7/ (or whatever pov version you’re using) Assuming your pov scenes and personal includes are in ~/pov

$ mkdir -p ~/.povray/3.7

$ cat povray.ini 
Library_Path=/home/bruce/pov/include/
Library_Path=/usr/share/povray-3.7/include/
# FULL HD 16/10
Width=1920
Height=1200
Antialias=On
Antialias_Threshold=0.3
Display=off
Output_to_File=on
Output_File_Type=T
Output_File_Name=/home/bruce/pov/output/
$ cat povray.conf 
[File I/O Security]
restricted

[Shellout Security]
allowed

[Permitted Paths]
read*=/home/bruce/pov
read*=/usr/share/povray-3.7
read+write=/home/bruce/output
read+write*=/tmp

Default file for povray.conf  is in /etc/povray/3.7/povray.conf and it seems that the user version can’t extend rights but only restrict them.

Rendering a scene: now trivial

It is now as simple as typing

$ povray -Isample_lego.pov

and results as a tga being outputted in the ~/pov/output folder.  Examples of dubious quality can be found in my git repository on bitbucket.

 

“infinite” bash history

I tend to use `screen`a lot and never reboot my computers. As my memory becomes flaky, I often need to search in my history and usually don’t remember which tab I used for a specific command.

I’ve solved this problem with my bashrc the following way:

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
export HISTCONTROL=ignoredups:erasedups

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
export HISTSIZE=100000
export HISTFILESIZE=200000

function history_sync {
 history -a
 history -c
 history -r
}

function hist {
 history -a
 history -c
 history -r
 builtin history
}

alias hgrep="hist|grep"

I can now use hist to “update history and display”  and hgrep to grep on history. Synchronization is still opt-in but it’s good enough.

My website is now a blog

After years of indecision, I finally decided to move my website onto a blog platform. I don’t know for how long it will last or if I’ll post often. I intend this place to be my hideout, where I can write notes and share about unimportant or technical stuff.

I will post either in French or in English, trying to tag correctly. I plan most of the technical stuff to be in English and part of the ranting to be in French 🙂

Comments are welcome but will be moderated / closed if they slip into unsafe area. The definition of an unsafe area is only mine and is definitely biased.