jump to navigation

Use growisofs instead of Brasero November 18, 2012

Posted by maxmil in : Uncategorized , add a comment

Brasero frequently fails to burn iso images for me. Often with an error message along the lines of
power calibration area error

If like me you use gnome and don’t want to have to bring in all the KDE libraries to use k3b in these cases the command line utility growisofs seems to work just fine

This is how you would use it to write (and close) a DVD

growisofs -dvd-compat -Z /dev/dvd /path/to/file.iso

Mount USB with executable permissions in Debian October 18, 2012

Posted by maxmil in : Uncategorized , add a comment

By default gnome automounts external Fat USB drives without the exec option.

With the gconf editor there is an option to change this. However in Debian the dconf editor does’nt have this option.

Another option is to add the device to fstab with the options you desire.

First get the UUID of the device using
ls /dev/disk/by-uuid

Then add something like this to fstab
UUID=XXXXXXXXX /mnt/usb vfat user,exec,uid=1000,gid=1000 0 0

Now unmount and remount

umount /dev/sdXX
mount /mnt/usb

Using maven help plugin June 28, 2012

Posted by maxmil in : Uncategorized , add a comment

I very often end up looking at the API docs for a maven plugin to consult its optional and required parameters for a given goal.

I’ve now discovered the maven help plugin which does just that but from within the shell.

For example to get documentation for the prepare goal of the release plugin

mvn help:describe -Dplugin=release -Dgoal=prepare -Dfull

installing oc8i extension in debian April 13, 2012

Posted by maxmil in : Uncategorized , add a comment

At the time of writing there are only the instantclient-basic and instantclient-sqlplus packages available in the debian repos.

Building the extension from source (using pecl) requires the instantclient-sdk package.

Since i could not find this for debian i used the rpm’s on oracles download site.

First convert them to deb’s using alien.

Then dpkg -i

Then pecl install oci8

Finally add the extension to the php.ini used by apache and reload apache.

Flex memory leaks and watching property chains September 7, 2011

Posted by maxmil in : Uncategorized , add a comment

As a general rule it’s a good idea to always unset any change watchers created via BindingUtils.bindProperty or Changewatcher.watch.

However in display objects this often requires a whole lot of boilerplate code listening for when your component is removed from the stage and even more if you consider that it might be re added at a later date.

Fortunately if you create a change watcher within your display object the scope of that change watcher is limited to the scope of the display object and so it doesn’t prevent the garbage collector from removing the object and watcher when the object is removed from the stage and you can avoid the boilerplate.

However whilst profiling my app today i have discovered that if your change watcher is listening to a property chain rather than a single property then this is not the case.

In this case multiple ChangeWatchers are created that reference each other and this, for some reason unknown to me, prevents the GC from collecting the ChangeWatchers and hence your display object.

Unfortunately in this case the boilerplate seems necessary :(

Love to hear if anyone could explain what is happening here…

/var/lib/dpkg/status and invalid character in revision June 27, 2011

Posted by maxmil in : Debian , add a comment

This error appears often in my system related to the names of virtualbox packages.

The current release of virtualbox packages no longer have this problem however the old packages are not removed from the status file.

The only solution seems to be to modify the status file by hand and remove the packages.

Another solution is to use this script written by Julien Valroff that clears purged packages from your status file.

Thankyou Julien.

Exclude hidden (dot) files from find June 8, 2011

Posted by maxmil in : Uncategorized , add a comment

find . -type f ! -iname ".*"

Using apt with an http proxy June 7, 2011

Posted by maxmil in : Debian , add a comment

First export http_proxy environmental variable.

sudo export http_proxy=http://uname:pass@proxy:port

apt / aptitude will now use that proxy.

Setting up apache forward proxy with basic authentication

Posted by maxmil in : Uncategorized , add a comment

To set up an apache forward proxy with username password authentication you need to add something like this to a catch all virtual host. If apache is only listening on port 80 this would be your default virtual host.

ProxyRequests on
<Proxy *>
Order deny,allow
Allow from all
AuthType Basic
AuthName "Password Required"
AuthUserFile /etc/apache2/proxy.passwd
Require valid-user

You must obviously have mod_proxy activated in your apache.

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

To create the password file and add a user alice do

htpasswd -c /etc/apache2/proxy.passwd alice

Find out which process is listening on a given port May 9, 2011

Posted by maxmil in : Debian , add a comment

In GNU land, for port 123 this goes like
lsof -i :123

Or on Windows

netstat -aon | findstr 123 (get the process id)
tasklist | findstr processId