Proxmox – Passthrough card/device to openVz container

I wanted to passthrough a dual tuner TV card (Hauppauge WinTV Nova-T-500) to an openVz container in order to use tvHeadEnd.

Here I show how to achieve it with this particular PCI card but the procedure should be the same for any device.

First you need to know what device/devices you want to pa[......]

Read more

Posted in How To | Tagged , | Leave a comment

Use Remmina to satisfy all your remote connection needs

Remmina is a remote desktop client that support multiple network protocols (RDP, VNC, NX, XDMCP and SSH) in a nice and very user friendly GUI.

In its basic usage, you only need to know the protocol, the server (domain or IP address), username and password.

For example, this shows how to conne[......]

Read more

Posted in How To | Tagged , , , | Leave a comment

Test email from command line

After having setup an email server (eg: using gmail as smtp server or sendmail as a SMART HOST or any other way you want..) you need to test it.

The quickest way, for me, is to do:

mail -s Test myEmail@gmail.com < /dev/null

This will send an email with no body text.

Enjoy!

Posted in How To, Tip | Tagged , , | Leave a comment

PHP: remove duplicate elements from a multi-dimensional array

"array_unique" removes duplicate values from an array. Unfortunately it doesn't work with multi-dimensional arrays.

A quick workaround is to serialize all elements of the first/parent array in order to make it unidimensional, let "array_unique" doing its job and then unserialize it back.

A one[......]

Read more

Posted in How To, Programming, Tip | Tagged | 1 Comment

Ban offending IP addresses – fail2ban

If you have logwatch installed (or you read auth.log file) you can find lots of entries mentioning login attempts/attacks.

Something like:

  1.  
  2. Nov 20 06:30:43 serverName sshd[63467]: Address 91.191.166.95 maps to 91-191-166-95.netdirekt.com.tr, but this does not map back to the address - POSSIBLE BR[......]

Read more

Posted in How To | Tagged , , , | Leave a comment

Send system emails using gmail as smtp server

I wrote before about sending system emails using sendmail as smarthost.

Today I describe how to do that using gmail smtp servers.

The software that will allow us to do that is called "ssmtp" and it's a "send-only sendmail emulator for machines which normally pick their mail up from a centralized m[......]

Read more

Posted in How To | Tagged , | 1 Comment

How to shred/wipe disks/partitions

If I decide to sell or when I have to return a hard drive I want to make sure not everyone can access my data.

To do that I've often used the command "shred" this way:

  1. shred -vzf -n 5 /dev/sdb

where:

  • -v; show progress
  • -z; add an extra pass of zeros to hide shredding
  • -f; change permissions[......]

Read more

Posted in How To, Tip | Tagged , , | Leave a comment

How linux sucks

how linux sucks comic

From time to time I like adding some funny images I find on the net..

I know it's an old one! :-)

Posted in Fun | Tagged | Leave a comment

Root HTC Wildfire (Android 2.2.1), install Cyanogenmod 7 and fix GPS

I've been using my Android phone (HTC Wildfire) for quite some time now.

It's not a bad phone but it's somewhat limited, mainly in memory and speed. Plus, I really wanted to experiment with it and see what a custom ROM could do.

From my research SuperOneClick is the most popular software to roo[......]

Read more

Posted in How To | Tagged | 11 Comments

Formatting a partition from command line

Formatting a new partition from the command line is pretty straight forward.
I do it quite often when playing working with LVM.

So, long story short, format the partition (to ext4 in this example)

  1. mkfs.ext4 /dev/sdxy

Change the "reserved-blocks-percentage" for data partition (optional).
Normall[......]

Read more

Posted in How To | Tagged , , , | Leave a comment