Issue with making a bootable Ubuntu 15.04 USB stick

I wanted to create a boot USB stick from an Ubuntu 15.04 desktop that was running in a Virtual machine. So I plugged in a clean USB stick, and picked “Startup Disk Creator” from the Launcher. Then picked the USB stick as the target, and waited for 15 minutes. When the utility was done, it [...]

Linux: Quick multiple page scanning with scanimage

It’s often required to scan a lot of pages in one go, even manually. The problem is that when doing individual scans, there’s a significant delay between each scans, as the computer initializes the scanner for each. The trick is to use scanimage’s batch scan feature. A typical command for scanning an 10 A4 pages [...]

ImageMagick convert from pdf to jpg and vice versa

To convert all pdfs into a jpgs with fairly good resolution (Linux, bash): for i in *.pdf ; do convert -density 300 “$i” “${i%%.*}.jpg” ; done Without the -density parameter, the result is pretty lousy. To prepare a lot of image scans for printing, into a single pdf doc: convert *.jpg -colorspace gray -contrast-stretch 1% [...]

MuseScore notes on Fedora Core 12

Random notes playing with MuseScore 0.9.6 (pun not intended): Installation (after grabbing the RPM file from the web): # yum install –nogpgcheck MuseScore-0.9.6-1.fc12.x86_64.rpm Which installs the file with no signature. Somewhat dangerous in theory, as the RPM could in theory contain malicious code (as if a signature helps in this case). The command line for [...]

Plain-text mail from Thunderbird (under Linux)

Introduction I’ve been annoyed for quite a while by Thunderbird’s strong inclination towards HTML mail. To the extent that if I don’t really, really verify that a mail goes out in plain text, it’s probably going to slip out in HTML. This is bad in particular when sending mails to Linux-related mailing lists. They don’t [...]

Running JavaScript code from the command line

Sometimes, there are JavaScript snippets for the sake of obfuscation (hmmm, including this site). This is code made complicated intentionally, to prevent web spiders from harvesting addresses or emails. But hey, what if I’m the one with the spider? The simple, and somewhat dangerous solution, is to run the JavaScript code on a local interpreter. [...]

Finding a function / method in a large C/C++ project

So there’s this huge pile of source code, with an enormous amount of functions and methods. How can you quickly find where each is defined? IDEs has this functionality built in, but it’s not so easy to push an already existing (and huge) project into an IDE. The solution is so simple. For example, $ [...]

Setting up a cross compiler: Buildroot notes

Just a quick summary on how to compile my own cross-compiler in 20 minutes. Download from Buildroot’s home page Run “make xconfig”. The configuration is stored in .config Possibly set BR2_JLEVEL=8 for parallel compilation(even though 0 should just do it right according to the number of processors present) Pick little Endian ARM Cortex-9 for Xillinux [...]

Making a click-for-help window with jQuery’s tooltip widget

Intro I needed some neat overlay to appear when the user clicks those question-mark icons on a specific, Drupal-based page. So I went for using jQuery’s tooltip widget, with due adaptations. It turned out to be a wise choice. The idea is simple: Click on the question mark, an overlay window appears right underneath it, [...]

A perl script sending mails for testing a mail server

Just set up your mail server? Congratulations! Now you should test it. In particular, check if it relays mails to other servers and if the response time is reasonable. Here’s a script for doing the testing. Just edit the arguments to send_mail() to match your setting. #!/usr/bin/perl use warnings; use strict; use Net::SMTP; send_mail(’127.0.0.1′, # [...]