How to reduce auto-completion popup delay in NetBeans 7

I’m not an Eclipse person, as I could finally notice – I simply can’t get beyond eclipse’s projecting and addin system..I’m probably too stupid, stubborn or something like that, but well, I’m happy exclusively with NetBeans.
Now as I recently got to use it again for a new university project, I noticed that the auto-completion speed wasn’t so perfect.. Essentially, everything required to minimize that artificial delay between a key type and the completion list popup is to put a
<entry name="completion-auto-popup-delay" value="0" />
between the <editor-preferences> tags in the ~/.netbeans/7.3.1/config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml file

Finally got some motivation for a new project!

An SDL2-binding for the Xwt framework while using OpenGL for drawing 2D UI components. Yes, it is theoretically redundant work as there are good UI toolkits out there, also for Mono/.Net, but well..I’m still young, I’ve got the time for doing it :)

Link to the project repository.

During the last couple of days I could even figure out an internal SDL bug! The event loop and basic lw-level component adaption runs nicely – more details will follow soon!

Locking screen slightly senseless on Linux?

At home, it’s not really happening that often but in public areas like at university: Being urged to leave the laptop unattended. First solution that might jumps into one’s head: Locking the screen to avoid others to mistreat your personal workspace and hack all your account information and so on.

This might be easy to do on Linux as well as on other operating systems (simply via hitting Ctrl+Alt+Del or running xlock4 in a terminal) – but you still can directly bypass the dark screen via accessing the kernel console via Ctrl+Alt+F1 (and/or other F-keys)!

Gotta research a little more on that!

Edit: Okay, though one might be able to switch to an other console instance, it’s needed to log in immediately after doing this! So yeah, it’s not a security issue after all, I just had the feeling it was like so..

Wow! Linux does Printing & Scanning documents it with absolutely no PITA!

I just installed Manjaro on my little Netbook which I’m quite only using for document printing & scanning purposes. And guess what: Setting up the printer driver using CUPS and installing the scanner directly in SANE only took a couple of minutes – doing so on Windows was a real PITA instead:
Searching the right driver from the manufacturer’s website, noticing that there was no x64 driver for Win7, reinstalling Windows just to finally have it available..and on Linux, all the drivers were there already. Still can’t believe it. It’s awesome! :-D

Oh and something beyond Windows’s “default” capabilities: There’s a complete OCR functionality available in SANE – you just have got to install a ~2 MB large package called gocr!

Permanently enable HTML5 “Beta Test” on youtube in Chrome/Chromium

I know it was quite a while ago when youtube established a feature that allows users not to need Flash anymore but just raw HTML5 video functionality to view videos – but now that I noticed this tremendous RAM usage again, I began thinking about enabling it again.

Done easily, and it works nicely – even on Linux. Until the browser shut down and removed all the cookies. Meh. But well, Google is your friend, innit?
I stumbled upon this user script for Chromium which puts in a specific cookie for YouTube to tell it that I want to have html5 by default. Copy-paste the code into a file whose name ends with “.user.js”, open the Extensions page, drag&drop the file into the Extensions tab – and that’s it.

One further way to live without Flash :-)

How to: Convert aac/mp3 to mp4/m4a audio format on Linux

Now that I recorded a bunch of .aac files I have to make them compatible to the audio codecs installed on my car radio – which is mp3/wma and aac, whereas the latter does somehow not mean files which are called ‘.aac’ but ‘.m4a’! I have no choice – I didn’t invent it :-P

Anyway, a first halfway working approach to do this is to convert the input files to ‘.wav’ files, store them in the RAM for fast enough performance, and convert them to the target format using NeroAacEnc (also available in the AUR) - it’s said by community members that this is the best codec available..for free!
Oh, ffmpeg is required as well, not to forget to mention this one :)

# Specify input format - can be everything that ffmpeg supports!
rm ${tmp}

for a in *$fmt; do
# decode to .wav and encode to .m4a
   ffmpeg -i "$a" ${tmp} && neroAacEnc -q 0.5 -if "${tmp}" -of "`basename \"$a\" .${fmt}`.m4a"
# remove temp file
   rm ${tmp}
# remove original file
   rm "$a"

Perhaps this should be done on multiple cores the next time. Gotta see how it’s done.

How to rip/record internet radio streams on Linux

Though I surpassed my first couple of months on Linux with just listening to internet radio stations without actually recording them I do want to record them now – just for having a bunch of tracks on my car radio as well:

  1. Install streamripper (build from source, from the AUR or from somewhere else)
  2. Download & Install Streamtastic – or an other streamripper front-end
  3. Start Streamtastic via Java
  4. Get started and let it record everything for you

Streamtastic internet radio ripping software

Multi-core LZMA2/7-zip/xz compression ftw!

Just looked for a way of compressing tarballs into “xz” files on multiple CPU cores – and found pixz. It’s also available in the AUR. Runs very fine and does the usual compression job within (who guessed it) a small fraction of the original single-cored duration! :-)

AngularJS, Bootstrap und was nicht alles

So, in meinen verbleibenden Tagen bis zum Semesterbeginn am 11. September werde ich noch einmal mäßige Recherche und Updating rund um das Thema Internet 2013 betreiben bzw. habe dies schon getan:

  • Mit dem AngularJS-Framework lassen sich also auf tolle Art und Weise Daten, die aus irgendeinem Backend möglichst asynchron kommen, dynamisch und auf Clientseite verarbeiten und in die bereits existente Seite einbauen. Netter Ansatz, Daten, Modell und View auseinander zu halten!
  • Bootstrap bietet als jQuery-UI-Alternative eine wahnsinns Palette an Möglichkeiten, wenn man auf der Website häufig und cross-Domain verwendete Nutzerelemente benutzen und Auflösungsresponsiveness für mobile Clients bieten möchte. 
  • Single-Page-Applications/One-Page-Sites sind prima geeignet, um dem Besucher eine Geschichte/Projekt/zentrale Information näher zu bringen.
  • SEO überall sowie über alles. Was bringt schließlich guter Content, wenn man im Interwebz nicht gefunden wird? – Kann man es nicht auch ein wenig übertreiben?
  • “.com”-TLDs spielen nicht mehr die zentrale Rolle – lieber werden dem Seitentitel entsprechende Endungen verwenden.
  • Was ist Flash?
  • Node.js rettet nicht die Welt. JavaScript als serverseitig genutzte Sprache zu benutzen kann aber interessant sein! Man denke nur an die gemeinsame Codebasis von Server und Client :)
  • PHP is not dead – zum Glück! :-D

Installing&Setting up Lighttpd + PHP in 2 Minutes

I personally never thought it was that easy to install & set up an entire web server on Linux in such short amount of time:

  1. pacman -S lighttpd php-cgi
  2. Edit /etc/lighttpd/lighttpd.conf and add following two lines:
    server.modules = ("mod_fastcgi")
    fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi","socket" => "/tmp/php.sock" )))
  3. To start lighttpd, just execute lighttpd -f /etc/lighttpd/lighttpd.conf
    If you want it to be launched at boot time, just say systemctl enable lighttpd
  4. Your web files will be stored in /srv/http by default. If you want to edit them without root rights, just make them your own :-)
  5. You might need to have index.php as your default “fallback” file – just head to the config and add “index.php” to the index-file.names entry.
  6. Open your browser and type ‘localhost’ to see if it works

Furthermore it’s strictly recommended to add some basic MIME type definitions like those for e.g. CSS-Stylesheets to the mimetype.assign field: ".js"=>"text/javascript", ".css"=>"text/css"