Andras, HA7ILM's blog

Use less space

...everywhere.

$ cat ~/.bashrc
alias cd..="cd .."

Rational Resampler problems

If you have zero signal coming out of the Rational Resampler block in GNU Radio, or such queer signal as on the top right:

Enabling mod_rewrite on Linux MINT 16

There are different ways of doing this on different distros.

I hope that I will save you 15 minutes of searching where the config files are, etc.

su -s
a2enmod rewrite
nano /etc/apache2/apache2.conf

Change this part:

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

Now type:

service apache2 restart

You're done.

[fun] Bathroom mirror for Linux guys

...if your laptop has a webcam built-in:

mplayer tv:/// -vf mirror

Features

  • Congratulations. Now you're watching an LCD display even while drying your hair.

Limitations

  • Emulation works, but still not as good as a physical mirror.

Possible improvements

  • We should implement it in FPGA to decrease the delay in the processing chain.

How to solve screwed up screen on Linux Mint 16

After playing with mate-display-properties and setting various screen configurations, something went wrong, and my laptop screen was rendered with double pixels and a part of it was missing.

The solution was to delete ~/.config/monitors.xml, or at least rename it to something else.

strace has revealed that this is where mate-display-properties stores display configurations, and it is recreated the next time you run this application and click apply.

"Bundle" utility class in python

I liked this python recipe and I've extended it a bit, to make this class also iterable.

class Bundle:
	def __init__(self, **kwds):
		self.__dict__.update(kwds)
	def __iter__(self):
		l=[]	
		for d in self.__dict__:
			l.append(getattr(self,d))
		return iter(l)

o=Bundle(text="asdf",pos=(22,22))
print o.text
print o.pos
print "now iterating through:"
for i in o:
	print i

I hope that it will be useful to someone.
-- HA7ILM

Read-only root filesystem on Raspbian

While running Raspbian on my Raspberry Pi (Model B), the SD card repeatedly got corrupted when I removed the +5V power without properly halting the system.

Motorola battery discharger

While we have been looking for an easy way to format our new Ni-Cd batteries for Motorola HT-s, we've come up with this:

There are two 47R resistors in series on the battery terminal, so the 7.2V battery will discharge at a current of about 75 mA. The LED panel meter was picked up from eBay and was at a price of one and a half beer :-)

Some unix shorthands

I like to use some shorthands on my Debian based machines.

I usually make some small scripts in /usr/bin to call:

  • sudo apt-get install something by typing ag something
  • sudo apt-cache search something by typing ase something

I also have a small utility called dediff to check what's changed in /dev while I was just unplugging a device. This way it's easier to locate e.g. USB devices that create virtual serial ports.

[fun] Formula of Ham Radio

I've made up this formula while learning for my Electromagnetic Fields (EMT) exam for several weeks.

Given a capacitor C charged with Q, ham radio is:

If anyone actually finds any context in which the formula above actually makes sense, please add it in the comments :-))

Pages

Subscribe to RSS - Andras, HA7ILM's blog