Meizu M6 and Rhythmbox

I own a Meizu M6 for quite a while and I'm very happy with this iPod alternative. Anyway I had the problem that Rhytmbox didn't recognise it as a music player directly.

Some search on the net revealed that I simply have to create a new file on my device and that's it.

What you have to do is the following:

  • create .is_audio_player in the root of your M6
  • change the file's content to the following

    audio_folders=MUSIC/

  • Restart Rhytmbox and you'll find your M6 in the device section

Kultur:

MySQL command line return values and Bash scripting

As I already told in Suppress column names on MySQL command line output I use the command line interface of MySQL quite often. Especially if you want to do some shell scripting there are not many alternatives for this.

If you want to use the return value of SQL statement and assign it to a variable you usually do something like this:

  1.   sql="select name from table where id = 123"
  2.   name=$(mysql -e "$sql" -sN -u user my_database)
  3.   echo "name: $name"

Themen:

Development:

Suppress column names on MySQL command line output

I use the MySQL command line interface regularly to fetch some data from a DB. Usually I want to have to column names as well, but if you want process the output of the command directly this is just a pain in the neck... This is where the --silent and --skip-column-names is very useful. mysql -sN -e "select * from my_table;" -u my_database

Development:

Using Term::Prompt for terminal output from Perl

For a script I made recently to manage contacts to my LDAP server on the command line, I needed a package to easily output a prompt to the terminal.

The requirement is to be able to output things very easily and giving a default value that will be returned. After checking out some packages at CPAN, I decided to go for Term::Prompt. It offer a very convenient interface, basic checks for the returned value and works as I like it to.

The code

Themen:

Development:

SPAM protection on Postfix (Part 3)

Most spammers are very aggressive in terms of connection and re-connection to mail servers. Of course they want to send as many SPAM as possible in the shortest time period.

However if you're using postfix you can throttle that by being a bit more restrictive in your anvil settings in main.cf

RBLs on Postfix made easy

Real-time blacklists, DNS RBL precisely, are a convenient way to mitigate the SPAM problem on your server despite all critics about it. policyd is another option that you should consider. If you're using Postfix as your MTA it's quite easy to setup RBLs. Simply add the reject_rbl_client option to your main.cf and you're done. reject_rbl_client zen.spamhaus.org,

Linux:

policyd-weight and Postfix SPAM fighting

If you run your own mail server you have to think carefully about SPAM protection of course. The first line of defence is in front of the actual mail server or at least before accepting the actual mail body.

The problem is that in some countries the mail mustn't be rejected or dropped after the mail server accepted the mail from the outside. Therefore techniques like RBL or greylisting could help here.

Another option is using policyd-weight. This is a

Convert a text file from UTF-8 to ISO-8859-1

From time to time you stumble upon the problem of character encodings. You get a file in encoding A, but prefer it in encoding B.

If you have a Unix shell at your fingertips (or at least something similar) you can use the iconv tool to do the job for you.

Converting an UTF-8 file to ISO-8859-1 will be as simple as this:

Themen:

Development:

Uninstall or re-install a Drupal module

After upgrading my Drupal to 6.8 I faced the problem that one module didn't work right. Maybe it was broken before and I simply didn't notice that beforehand. However I needed to fix the tables and re-installing the module seemed the best idea to me somehow.

What you need to do are the following steps:

  1. Deactivate you module
  2. Use the uninstall tab on the modules page
  3. Remove the module from sites/all/modules/

Themen:

Internet:

Blade Runner - Ultimate Collectors Edition (5 DVDs im Steelbook)

Endlich ist sie da, die Collector's Edition von Blade Runner. Viele Jahre habe ich darauf gewartet endlich wieder die Kinoversion mit den Voice-over-Komentaren zu sehen.

[amazon B000X9WWWC full]

Es gab viele Diskussionen darüber ob die notwendig sind oder vielleicht auch nicht. Ist der Director's Cut besser oder nicht und so weiter und so fort.

Kultur:

Pages

Subscribe to Alles was schnuckelig.eu ist... RSS

Syndicate

Subscribe to Syndicate