Available languages

Useful links
Читать на русском

Tuesday, August 2, 2011

Adding REAL Firefox to Debian Lenny

it's a copy of original post:

Adding REAL Firefox to Debian Lenny

December 26, 2008
I realize it’s a touchy subject, but some of us prefer unmodified Firefox — including the standard Firefox icon — to Debian’s Iceweasel alternative. Here’s a three-step way to substitute Firefox for Iceweasel on a fresh Lenny install.

This procedure assumes you’ve downloaded and installed the latest Debian Lenny (aka “testing,” currently) GNU/Linux distribution, along with its standard GNOME desktop environment.
  • Using Iceweasel for the last time, download Firefox to your home directory. Let’s assume the name of the file you downloaded is “firefox-3.0.5.tar.bz2″ (the current version as of this writing).
  • Open up a terminal window and, as root, type the following commands (following each by hitting Enter):
      apt-get remove iceweasel mv firefox-3.0.5.tar.bz2 /usr/lib/ cd /usr/lib/ tar -jxvf firefox-3.0.5.tar.bz2 ln -s /usr/lib/firefox/firefox /usr/bin/firefox
    If you prefer, you can simplify the above commands by copying/pasting the following text onto your terminal command line:
      apt-get remove iceweasel; mv firefox-3.0.5.tar.bz2 /usr/lib/; cd /usr/lib/; tar -jxvf firefox-3.0.5.tar.bz2; ln -s /usr/lib/firefox/firefox /usr/bin/firefox
  • Finally, you’ll need a launch icon on your desktop. You can create that the standard way GNOME allows, or simply save this file to your GNOME desktop.
That’s all there is to it!
Well, one other point. To make use of browser plugins that have already been set up by your Debian installation, you’ll want to create a symlink from /usr/lib/firefox/plugins/ to /usr/lib/mozilla/plugins/, using this two-part command (as root):
    rm -rf /usr/lib/firefox/plugins; ln -s /usr/lib/mozilla/plugins /usr/lib/firefox/plugins
Incidentally, on my installation, the default flash plugin that came with Lenny (flash-mozilla.so) required me to click a large play button (shown at right) each time I visited a web page that used flash. So, I went to Adobe’s flash plugin download page and downloaded the flash plugin for debian, then installed it with the command “dpkg -i install_flash_player_10_linux.deb” (as root). That plugin (flashplugin-alternative.so) works much better.

Saturday, July 9, 2011

Driver for Canon Pixma MP280 printer-scanner

The driver is officially released by Canon
Printer driver: http://support-in.canon-asia.com/con...100301402.html
Extract the archive and find the .deb packages in the extracted folder... install the deb file that has "common" word in the name first, then the mp280 deb file.
Similarly download and install the scanner package: http://support-in.canon-asia.com/con...100302702.html
The same concept.
Download the scanner instructions from here: http://support-in.canon-asia.com/con...300410501.html
Solution of http://ubuntuforums.org/showthread.php?t=1582497 by dhayfule.

Saturday, April 23, 2011

Converting MP3s to M4B audiobooks, and M4B to MP3

Here’s how to convert M4B audiobooks (used by Apple iPod) to MP3, and how to create an M4B from one or more MP3s.
The easy bit first: M4B to MP3
For a single file:
ffmpeg -i -acodec libmp3lame -ar 22050
For a bunch of M4B files:
for m4b in $(ls -1 *.m4b); do ffmpeg -i $m4b -acodec libmp3lame -ar 22050 ${m4b}.mp3; done

The more involved bit is to create an M4B audiobook from a bunch of MP3 files, so I have an automated script.
First thing is to ensure all the MP3 files you want to include in ONE M4B have sequentially numbered names:
filename-01.mp3
filename-02.mp3
or, if you want to create the M4B from more than 100 M4B files:
filename-001.mp3
filename-002.mp3
etc.
Copy and save the script below to the file create_audiobook and make it executable:
chmod 755 create_audiobook
For each M4B audiobook optionally set the tags using environmental variables:
export AUTHOR="The Author"
export TITLE="Some Book"
export YEAR="2007"

Make sure you’ve got plenty of free space on the mount point the source files are on. If you need to have the HUGE temporary files put on another mount point with plenty of space (Allow for more than 3GB of free space) then set the TMP environmental variable to point to a location that has plenty of space and allows users to create/delete files:
export TMP=/tmp
By default, TMP is set to the current directory if not specified like this.
Now run the script, passing the output filename and the input file mask. Here’s two possible usages:
create_audiobook "Terry Pratchett - Colour of Magic" "Terry Pratchett - Colour of Magic - *.mp3"
create_audiobook "Terry Pratchett - Colour of Magic" *.mp3
Note the quotes around the two parameters that allows spaces in filenames.
#!/bin/bash
# create ipPod audiobook from group of sequentially named MP3 files
# Set environmental variables for track ID3 tags
# AUTHOR, TITLE, YEAR
# usage: create_audiobook
#
# Pass output filename on command-line with no extension, and use quotes if there are spaces in filenames
# e.g. create_audiobook "Terry Pratchett - Colour of Magic" *.mp3
# e.g. create_audiobook "Terry Pratchett - Colour of Magic" "Terry Pratchett - Colour of Magic - *.mp3"

if [ "x$TMP" == "x" ]; then
TMP=.
fi
echo “Args: $@”
echo “Author: $AUTHOR”
echo “Title : $TITLE”
if [ "x$1" != "x" ]; then
filename=$1
if [ "x$2" != "x" ]; then
echo “Output: $filename”
filelist=”$(echo “$2″ | sed -e ‘s/ /\\ /g’)”
echo “Filelist : $filelist”
echo “Writing HUGE temporary files to $TMP”
# Use a sub-shell to preserve spaces in filenames passed to mp3wrap
sh -c “mp3wrap -v \”${TMP}/${filename}\” ${filelist}”
if [ $? = 0 ]; then
mplayer -vc null -vo null -ao “pcm:nowaveheader:fast:file=${TMP}/${filename}.pcm” “${TMP}/${filename}_MP3WRAP.mp3″ 2>&1 | tee ${TMP}/create_audiobook_mp.log
# example from log
# AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
AUDIO=”$(egrep ‘AO:’ ${TMP}/create_audiobook_mp.log)”
echo “Audio Format: $AUDIO”
RATE=$(expr “$AUDIO” : ‘AO: .* \(.*\)Hz.*’)
CHANS=$(expr “$AUDIO” : ‘AO: .* .*Hz \(.*\)ch.*’)
SAMPLESIZE=$(expr “$AUDIO” : ‘AO: .* .*Hz .*ch s\([0-9]\+\).. .*’)
echo “ENCODING: $RATE Hz, $CHANS channels, $SAMPLESIZE bit sample size”
/usr/bin/faac -R $RATE -B $SAMPLESIZE -C $CHANS -X -w -q 80 –artist “$AUTHOR” –album “$TITLE” –title “$TITLE” –track “1″ –genre “Spoken Word” –year “$YEAR” -o “${filename}.m4b” “${TMP}/${filename}.pcm”
rm -f “${TMP}/${filename}.pcm”
rm -f “${TMP}/${filename}_MP3WRAP.mp3″
rm -f “${TMP}/create_audiobook_mp.log”
echo -e “\n\nCreated ${filename}.m4b”
fi
fi
fi


Article is token from http://intuitivenipple.net/10/converting-mp3s-to-m4b-audiobooks-and-m4b-to-mp3

Thursday, January 27, 2011

Musea in de 21ste eeuw. Ideeën Projecten Gebouwen

Datum 29/01/2011 – 30/04/2011
Vanaf 29 januari tot en met 30 april kunnen jullie de lege zalen van het Koninklijk Museum voor Schone Kunsten Antwerpen doorlopen.
Maar waarvoor!? Lege zalen. Ze zijn toch met de renovatiewerken bezig, dacht ik.
Maar het blijkt dat de echte renovatiewerken pas in mei zullen beginnen. En in het einde van 2014 zal het museum de deuren weer open doen met een grote tentoonstelling over de invloed van Rubens op de Europese schilderkunst.
Vandaag staat het museum ook niet stil en houdt een tentoonstelling over musea gebouwen.
Musea zijn brandend actueel.
Mensen richten zichzelf tot kunst. Ze weerspiegelen het verleden, heden en toekomst. En uiteraard doet het iedereen op zijn eigen manier.
Schilders – schilderen. Dichters – dichten. En architecten – bouwen.
Denk maar aan het Parijse Centre Pompidou van 1977.
De expo toont prominente en toekomstgerichte bouwprojecten uit het voorbije decennium. Het gaat om projecten die in Europa, Noord-Amerika, Azië en Australië gepland, in uitvoering of voltooid zijn. Vier thema's staan centraal: renovatie en nieuwbouw; de uitbreiding van bestaande musea; museumarchitectuur in het weefsel van de stad en musea in de natuur.
Je kan ontwerpen bewonderen van internationaal gerenommeerde architecten als Tadao Ando of Jean Nouvel.
Ook de twee Antwerpse projecten, het Museum aan de Stroom(MAS) van Neutelings Riedijk Architecten en het KMSKA van Claus en Kaan Architecten Rotterdam komen aan bod.
Het gloednieuwe Museum aan de Stroom opent op datzelfde moment wanneer het KMSKA sluit de deuren dicht voor een ingrijpende renovatie en uitbreiding die enkele jaren zal duren.
Antwerpen staat niet stil. Laten we eens kijken wat er nog gezien kan worden.

Get .ppt and .doc files about this topic here.

Thursday, December 30, 2010

Mass printing... How to print locked pdf file. Part 2: Windows.

I've already described a way to solve this problem for Linux users here.
In Windows it can be solved even easier.
Just follow the instructions:

    Download pdf2djvu.
    unpack the downloaded archive
    copy a pdf file with ban on printing to the program directory(pdf2djvu directory).
    open a terminal in the program directory and run the following command:
         pdf2djvu -o output.djvu locked_pdf_example.pdf

    output.djvu - output file in djvu format
    locked_pdf_example.pdf - input file (name of the pdf file with ban on printing)

Output.djvu has a lot of advantages: it is usually smaller and you can print it!
To view djvu files you will need WinDjVu.


Copy music from iPod to PC

I'll give iPod 0 points in this case because it's not easy to get your music back from your iPod.

It's not a secret that all the music files on iPod are in the hidden directory \iPod_Control\Music\.
To see hidden files in Windows XP:
1. On the Tools menu in Windows Explorer, click Folder Options.
2. Click the View tab.
3. Under Hidden files and folders, click Show hidden files and folders.
Note: To access Windows Explorer, click Start, point to All Programs, and then click Windows Explorer.
To see hidden files in Windows 7:
1. Open Folder Options by clicking the Start button Picture of the Start button, clicking Control Panel, clicking Appearance and Personalization, and then clicking Folder Options.
2. Click the View tab.
3. Under Advanced settings, click Show hidden files and folders, and then click OK.
Copy all files/folders from \iPod_Control\Music\ to a folder on your pc.
But our adventure does not end here: the files have wrong names.
Download Tag Scanner and rename the files using a mask. E.g.: %artist% - %title%
Program interface is intuitive.

But the mp3 files may not contain ID3-tags(optional information). In this case you should switch to the "Tag editor" in the program TagScanner and add the information you know yourself. I added authors and titles for only 16 songs(out of 367).

Alternatives:
  • Practice in programming and write a little script. For example, using id3lib.
  • Use iTunes.

OpenGL, C++ and GLUT using CodeBlocks and MinGW

Original can be found at LevelByLevel.com: OpenGL, C++ and GLUT using CodeBlocks and MinGW – Updated.

On my old blog, CodieCode, I wrote a tutorial on how to set up an OpenGL, C++ and GLUT environment using the CodeBlocks IDE and MinGW compiler on a Windows XP and Vista machine. This was a popular post which seemed to help quite a few people. However time moves on, software updates and operating systems change. I’ve decided to update this tutorial with Windows 7 (though this should still work fine on XP and Vista) and the latest version of CodeBlocks and MinGW. Hope it helps

I would like to add that if you’re serious about learning OpenGL, I think it’s a must that you own “The Red Book” (OpenGL Programming Guide by Dave Shreiner). You can buy it from Amazon (with the link on the left) or wherever you normally buy your coding books. Either way it’s a fantastic resource to have and it’s helped me countless times in the past.

———

If you’re interested in coding in OpenGL and C++, a great way to start is by using GLUT. GLUT takes care of a lot of the difficulties in setting up an OpenGL project and lets you get started on your project quick and easily. In this tutorial I will guide you through installing and setting up the software you’ll need (CodeBlocks, MinGW and GLUT).
Before you can start you’re going to need a few things:

Windows – I’ve updated the steps below to run on Windows 7, Windows XP and Vista, If you manage to get this working on other operating systems, let me know

OpenGL – I’m not going to go into how to install OpenGL in this tutorial as most people will be using Windows XP or later and OpenGL comes ready in these operating systems.

GLUT – To download the GLUT files you’ll need click here and download ‘glut.zip’.

IDE (Integrated Development Environment) – While it’s possible to use an editor (such as Notepad++) and makefiles. I find the easiest and most efficient way to code is using a good IDE (be careful there’s some not-so-good IDE’s out there). The best that I’ve come across is CodeBlocks (I’m not a fan of using Visual Studio for OpenGL but you can use that too if you wish) and it’s this IDE that we’ll be setting up today.

C++ Compiler – The compiler I’ll be using is MinGW, there are many advantages to using this but I wont go into these here.

So without further ado, lets start: