Quantcast
Channel: Mark P. Lindhout’s Flamepit
Viewing all 11 articles
Browse latest View live

The FSFE Blog Theme — Up and running!

$
0
0

As you can see, the Pome theme I developed for the FSFE Fellowship is up and running on these here servers!

I’m really happy I got the opportunity to provide some help to the important work of the FSFE, and you can expect more updates and improvements to the theme soon.

For now, browse around, and if you find any bugs or errors, please drop by the Blog Project page for Pome, or you can send me an email at: <marklindhout AT fsfe DOT org>

Later!

Mark P. Lindhout.


The Threat of Digital Incompetence — Censorship Codified Into Law

$
0
0

Today, I read an article on the TOR routing service. The article was a piece of sensationalist, badly researched, idiotic crap. The article accompanied a television show in which several people speak on the The Onion Router. These people have little to say on what TOR actually is, but they seem to have it clear in their minds that it should be prohibited. In their minds the service is a breeding ground for all kinds of illegal activities. The routing service is consistently misnamed as The TOR Network, which only adds to the confusion.

The scariest part of the whole thing is when the programme’s creator interviews the Dutch parliamentary member Khadija Arib. She is asked on her thoughts on child pornography being distributed by users of TOR.

Her answer [Dutch translation mine]:

I have never heard of the TOR network before, and I’m shocked. I will ask justice minister Opstelten to crack down on it.

Because it can not be such that we think up laws and regulations and there’s still a possibility to abuse children in another way.

There it is again: Child Pornography, the magical words that together with the eponymous Terrorism are the munition of scared, unknowing politicians who seek to censor that which they do not understand. These arguments (assuming you can consider single-termed moral deadlocks arguments) always pop up in discussions on Internet regulation. They seem to be the evilest things of all, something that has to be prevented at all cost. So these politicians, not hindered by any knowledge of informational infrastructure, think up a law. “This law will make the tubes of the internets a safer place for everybody.”, so they believe.

Instead, through lack of understanding by the legislators, the law restricts users. All users. Even those for whom this law wasn’t even intended. I have yet to see a single example of the opposite. This happens always with power and freedom shifting away from citizens, and into the hands of large institutions. (Governments, companies, you name it.)

As user Mozes.Kriebel in this comment thread on the article wittily put it [Dutch translation mine]:

Child pornographers buy bread at the bakery. Therefor, I want the government to prohibit all bakeries.

But this has gone on long enough, it is not funny anymore, it is not a joke. As Joshua Kopstein puts it: It’s No Longer OK To Not Know How The Internet Works. As long as politicians don’t take the time to understand the basic infrastructure of the internet, this problem will persist. Political incompetence is already rampant, we don’t need these people meddling in something that has been working and evolving perfectly fine on its own for the past 40 years.

The Internet is a fundamental part of our modern world. It provides millions of people with a means to live. It provides education, knowledge and a platform for free speech. It allows for communications through political barriers, and helps bring down corruption and totalitarian governments. This machine —of which we are all a part— is the single greatest, most unifying invention we as a species ever achieved. And, by the stars, it has pictures of cats! It is such a formidable victory of thought and freedom that I’m surely not going to stand idly by as a bunch of nitwits in suits shoot it down.

Proposed treaties such as SOPA, PIPA and ACTA have made something clear; Just how incompetent politicians are when it comes to the Internet. But there are no compromises in freedom. There is no lobbying when it comes to freedom of speech. Digital incompetence is proudly flaunted as ‘conservative’ by politicians like Khadija Arib. On Twitter.

This is about our future. About our freedom. It is not a joke, and it is sure as hell not funny anymore. When politicians refuse to gain a basic understanding of the mechanisms they try to mandate, they should be replaced by any means neccesary.

PHP error: “The MySQL extension is not installed” on Lighttpd, Debian

$
0
0

An issue that has baffled me for the past weeks has finally been solved, thanks to my digital detective friend from Santarago Labs.

This post applies to the following errors:

  • WordPress
    • “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”
    • “Deine PHP-Installation scheint nicht über die von WordPress benötigte MySQL-Erweiterung zu verfügen.”
  • OpenCart
    • PHP Fatal error: Call to undefined function mysql_connect() in system/database/mysql.php on line 6

The Story

I had been having strange intermittent issues with PHP on my web server. The server runs the absolutely wonderful Lighttpd. On every couple of requests to the PHP CGI backend, there would be an error. The error was basically that PHP could not connect to MySQL because its Shared Object, its mysql.so, was missing. This error usually pops up if you just freshly installed PHP and forgot to install MySQL, but that was definitely not the case. Besides, that would not explain why it sometimes did work. Very strange indeed.

So, being the blunt sysadmin-in-teaching that I am, I re-installed PHP, Lighttpd and MySQL. No dice. I checked, and double checked PHP, MySQL and Lighttpd configuration files, everything seemed just fine.

At first we thought it might be a time-out thing. Some badly written PHP software open such a large number of connections to MySQL that the system runs out of port numbers. But none of these signs were apparent. No errors of that kind, and when the system did work, it was fast. A struggling application would most assuredly create load, and it wasn’t there.

Turning on all logging, and still nothing out of the ordinary. No errors, except the intermittent complaining about the missing MySQL extension. What a mystery!

So, what was going on?

It turned out that after upgrading Debian to a new version (from 5 to 6, in this case) the web server did not correctly kill off all php5-cgi processses. The output of pstree -a showed that there were some stray processes directly under root which sometimes were appointed a request. This would definitely account for the intermittent behavior!

Solution

First, run pstree -a

Then, check the results. The PHP processes should look something like this.

In short, they should all snugly nest under the lighttpd process. If you find some PHP processes floating around elsewhere, continue to the next step.

Kill off all PHP processes by doing: kilall php5-cgi

And you are done!

I hope this post will help someone with the same problem as me, and that it will save someone the many hours I wrestled with this problem. Again, thanks to Vincent!

Let me know what you think :)

HTC Desire HD keeps opening the Locations app, and goes to speaker during phone calls.

$
0
0

Annoying phone troubles? Yes sir!

My previously wonderful Android phone was recently becoming quite moody. It kept opening the ‘Locations’ application, as if it wanted to navigate away. I get the hint, phone. Even more annoying: during phone calls, it kept turning on the speaker, which made for ringing ears and fragmented conversations.

After reading all across the net, and many people offering solutions to do with removing or blocking the Locations application, I came across a post which hinted it might have something to do with dirt stuck in the micro-USB connector. The post explained that the USB pins 4 and 5 are used, when connected with a resistance between them, as an indicator of a dock being present. Such a dock would be a car kit or a desk dock, and it seems logical to expect the behaviour my phone was displaying. You would indeed want the phone to go to speaker when docked!

Solution

The solution is clear, but is a bit more complex than it seems: Clean your Micro-USB port and headphone jack on your phone.

I had to try this three times before I achieved actual results. Many people suggest compressed air for blowing clean the connector, but that wasn’t enough in my case. Here’s what I did.

  1. Shut down your phone.
  2. Remove obvious dirt, dust and grime by blowing in the connector.
  3. Use a cotton-tip (with a tiny drop of sunflower-oil) to remove large pieces of dirt that are stuck.
  4. Use a tooth-pick to scrape clean the copper leads of the Micro-USB port.
  5. Use a tooth-pick to make sure you cleaned out all smaller pieces, and that the port is absolutely clean.
  6. Try booting up your phone. If the problem persists, try the above steps again.
I was very surprised how stubborn the dust in my phone was. I had to repeat the above three times to make it work.
So, people with Android-troubles, let me know how it goes!

Bye bye, Netherlands.

$
0
0

First, a little superficial history. In the Netherlands, we’ve had a very liberal society these past 40 years. Freedom was the default here, and everybody could do whatever they wanted. It was an utopia. I mean, we even had a somewhat working democratic system!

Over the years, I’ve gotten to know quite some people that are from non-Dutch cultural origin. They see us in a very different way than I do. When these people think of The Netherlands they see freedom, open drugs policies, people that respect others. They see opportunity and liberty. This is, however, often based on a lack of information. (Let’s be honest here: If you were to ask any Dutch person about Germany, most of them would start blabbering about lederhosen and beer as well.) And that is not a problem, because that is what information is for. Let me offer you my perspective.

About Myself

Like any warm-blooded Dutch guy, I love talking about myself. So here it goes; The Netherlands: The country I grew up in. I worked, lived and went to school here. My entire family lives here. I can only swear convincingly in Dutch. I eat a lot of cheese, and frown upon clogs and windmills. I like speaking really loud, drinking beer, cursing, and I continually concern myself with everybody else’s business. As you can see, I am very Dutch.

The Netherlands are a very crowded place. As I’m writing this, there’s almost 17 million people registered in the country. These people all live in an area of 41.500 square kilometers, which makes the country one of the most densely populated ones in our neck of the woods. That is even regarding the entire countryside, because cities like Amsterdam are infinitely more busy and full. Couple that with the fact that we’re all giants over here; The Dutch are literally on average the tallest people in the world. Add a love for loud talking, a screeching, tongue-knotting language, and you’ve got chaos.

Everywhere is noise

Without noise, Dutch people cannot live. A small anecdote about this; The government replaced the air raid signaling system. The old system was unreliable, and needed to be tested. So each first monday of the month at noon, the sirens made it sound as if war was coming. When the new system was introduced, these test weren’t needed any more. This was a great improvement upon the previous, noisy system. I don’t know if you’ve ever heard one of those things from up close, they are loud. —And when I say loud, I mean an ear-shattering 135 db at 30 meters— Anyway, the noisy tests weren’t needed anymore than once a year. The designers of the system were happy. But not the people! There were calls, emails, and signatures. People felt it was worse to not have a blaring air raid signal across the country once a month. Why, I have no idea. Some said tradition, some said security, most said something along the lines of “I like the noise!”. Then the government chimed in with the ridiculous idea that citizens would need to hear the sirens more often as “not to forget the signaling and the actions to be taken”. So now, even though it’s unnecessary, each monday it’s as if the Germans are dropping in again. (To smelt our bicycles for the production of tanks, of course.)

Another story. I recently came across a brochure. It displayed products for the visual enhancement of cars. Spoilers, shiny wheel rims, stickers for the windows, exhaust pipes, etcetera. There was also a section with audio equipment for use in a car. Speakers, subwoofers, and the likes. What caught my attention specifically was a device called a vibration unit. What this device did was weird. It did not produce audio, but when attached to the car, it would vibrate. Similar to a subwoofer it created rhythmic noise. People watching the car got the impression there was really loud music being played inside. This is a device not for creating an audible signal, but noise for the outside environment. This device breaks into the private sphere of people and forces upon them your musical taste. (Which, for maximum effect, is often rather simplistic.) So, noise is what we thrive on here. And as you know, noise makes you sick.

Was it always like this?

From what I’ve heard, this country used to be nice. It used to be a safe haven for free thinkers and artists. But during the past decades the atmosphere has turned quite grim. There’s a very strong political current towards a Nationalist and Fascist government. So far this has culminated in having a raving lunatic as a kind of shadow prime minister, and nobody to oppose him in any meaningful way. What else have I noticed? An almost total cut of the arts budget. A lack of implementation of open data and free software in government organisations. The ever increasing amount of camera’s watching us is a sign as well. The totalitarian system our public transportation has turned into; Severely crippled, insecure chip cards, the complete shift of responsibility to the customer, the armed transportation security officers. Combine this with the very real political goal of running the country like a company, De BV Nederland (this roughly translates to The Netherlands Ltd.).

Of course, these things are my personal experience. They will look and feel different for others, but there’s a pattern here.

Being a nation of conquering traders since medieval times, commerce is the highest goal for the Dutch. Moral responsibility is not present in any layer of society, least of all in the strange version of bureaucracy we have. Modernized almost to a fault, yet a completely immovable moloch at the same time. The problem is this: Our government machine used to work as efficient as could be expected. Cutbacks and loss of knowledge has slowly hollowed it out, leaving a rather shaky platform for running a country on. The system is way too complex to critically analyze in this short piece. But every day the lines between large corporations and government blur, and that is dangerous for civilians any way you turn it. The great problem is that companies have only one goal: Make money. They have no moral obligation other than that. If such a system becomes a big part of a country’s identity, commercially ‘uninteresting’ groups (read: outsiders and minorities) will suffer.

If this continues, Dutch democracy will return to its state of a tyranny of the masses. We’re already more than halfway there, and it’s worse than a dictatorship. The people of The Netherlands are running towards it as fast as they possibly can, like lemmings off a cliff.

Taxes as pressure

My fiancée and I have been together for seven years. We have done our taxes together, as one financial unit, for this entire time. Two people living together used to be calculated as one financial unit, and be taxed accordingly. But suddenly not this year, since the definition of this unit was changed to only include married folk. This means our taxes were suddenly increased by three thousand euro’s on a yearly basis. Not to bicker, but that money would be better spend going into my drawer labeled ‘Getting Married’.

As long as you own a house, have children and get married, your life is easy in The Netherlands. However, if you do not buy a house or get married, you pay. Literally. Increased taxes, exemption of tax cuts, such things. I surely didn’t start writing this post to complain about taxes, but these are taxes that force people into living a certain way. Perhaps this is no different in other countries. It’s just very obvious here.

I don’t want to be what the government wants me to be. I have the right to do whatever makes me happy. As long as that doesn’t hurt others, I should not be punished for that pursuit. That is not the case here in The Netherlands. I am forced into a shape the people have decided upon as ‘acceptable’. That is not freedom.

Business

I’m a freelancer, which means I’m always on the lookout for a new gig. This means a lot of conversations with potential customers, a lot of talk about price, and a lot of talk about price versus quality. Dutch people think that they are entitled to things. An enormous shiny new plasma television? They have to have it, because they are entitled to it. This exceptionally childish attitude has surprised me many times. It permeates the business world as well. People always feel they are rightfully entitled your services, and because of that, they haggle. It is ridiculous. There’s literally no client I’ve had who didn’t try to talk down the price, get stuff for free, or just plainly tried to rip me off. People consider this a source of pride; this is the venerated trader’s mentality. The strangest of all: These people think this is a normal thing to do. One day they’ll call you a liar, cheat and rip-off, to greet you next morning as if nothing ever happened. From my fifteen years of experience in the field, this is a symptom of the complete lack of respect for Dutch folk amongst each other.

The same thing goes for paying the bills. I have only once or twice received a payment on time. It is common practice to wait at least twice the period stated for payment clearance. Sometimes you’re not even that lucky. People will pay half, and then start haggling. It’s like being in a bazar trying to buy a carpet. But lest you get the impression the Dutch are unprofessional, of course there’s those that just threaten lawsuit if you require them to pay. Having worked with Danes, Belgians, Germans, Italians and French, I have only rarely encountered this. This attitude in business is typically Dutch. They believe there is always a drop of juice left to be pressed out. And as no surprise this creates stress, often sours the relationship. Apparently there are enough alternatives, because they all keep doing it until they find a fool that gives in.

Who cares? We sure don’t!

Another expression of this lack of caring for others is the story of the woman that was raped in Utrecht in front of hundreds of people. They were so busy shopping that they didn’t even care to even call the cops. Or perhaps the example of the small girl that drowned in front of hundreds, since they were all too busy getting a tan. People really don’t care here. The stories are all around. What was once considered a normal action (jumping into water to save a drowning victim) is considered heroic behavior nowadays. If you fall into the harbor or even a pool, you’ll be lucky to survive.

This uncaring attitude opens the door to even worse types of people. There’s drunk folk screaming in the street as I type this, as it has been every night for the last 3 years. This is nothing special, except that I don’t live above a bar, or even near any. Really, people are so utterly anti-social they just don’t care anymore. —As you might’ve guessed, the only moment this comes in handy is when you throw a party.— Where most people see a free-for-all attitude which leaves everybody alone, I see a sorrowful lack of respect for anything but money.

It ranges from things simple to enormous. From the traffic light not staying on green long enough for elderly to pass to the convoluted ways you are being ripped off by government-mandated companies. The threatening tone and invasive way you are being addressed by the community officials, the standard mode of being under suspicion when using public facilities. It is a place without simple social habits and without politeness. No respect and no space to live for others.

My solution

And yes, I’ve given up finally. I can’t stand it anymore. I decided to emigrate to a country which respects privacy much more than The Netherlands, where freedom is still perceived as important, and where minorities and freelancers aren’t automatically forced into living like their neighbors. For me, right now, this country is Germany, and more specifically the city of Berlin.

We’ll see what happens in a decade or two.

 

Converting FLAC files to MP3 with FFmpeg and Bash

$
0
0

Yes, yes, I know, the title of this post is 100% geek-approved. All those acronyms mean little to most people, but I will explain.

Recently, a friend of mine started converting his music into FLAC, the Free Lossless Audio Codec. The name says it, it’s lossless. That is a plus, but since I don’t have a gazillion terabytes on my mobile phone, and would still like to check out some music he sends me now and then, I need my music to be old-school MP3.

Knowing the power of FFmpeg, I was thinking there must be a cool one-liner out there somewhere. However, most of the code I found was either too old, or not exactly tailored to what I was looking for. Therefor I’m publishing my snippet here, as much for myself (I am prone to forgetting this kind of stuff) as well as for the benefit of others.

Convert all FLAC files in a directory into MP3 files with FFmpeg.

$ (for FILE in *.flac ; do ffmpeg -i "$FILE" -f mp3 -ab 192000 "`basename "$FILE" .flac`.mp3" || break; done)

A little explanation; The brackets around the command allow for a nice interrupt when the user presses CTRL+C. This is practical especially when you’re processing many files. Seeing as we’re processing an album here, 15 files is no exception, and who wants to be pressing CTRL+C 15 times, right?

The for loop should be self-explanatory, but it has a little addition to a normal loop. The || (double pipe) makes sure all processing is done before the loop breaks. So, when an instance of ffmpeg exits with something else than status code 0, it will break the loop. Basically, it says: encode the file OR stop. This is handy for possible errors in the middle of a file set. You would like to see where it all failed, not end up with some corrupted files somewhere halfway and not know what’s going on.

The basename part makes sure the extension is changed from .flac to .mp3. If you would just drop the $FILE variable in there, you’d end up with files named cool-songtitle.flac.mp3.

Setting the bit rate in FFmpeg is easy. You can use the -ab option to set the bit rate in bits. (This is straight from the FFmpeg documentation, by the way) I used 192 kilobits, but you can use anything, really. Remember: the higher the bit rate, the larger the file.

Selecting input files is done by adapting the *.flac and `basename "$FILE" .flac` parts to your needs. You can input basically anything that FFMpeg can understand, which includes WAV, OGG, ACC, AVI, MPEG, MP3, FLAC and many, many more. For a complete list check out the list of FFmpeg supported formats.

The same goes for selecting the output format, in this case you adjust all occurrences of mp3 to your needs.

So, after this elaborate explanation of a small but useful snippet, what do you think?

GrooveShark Party Radio!

$
0
0

So, last weekend I was invited to a party here in Berlin. So, as I usually do on conquering the local hifi-installation, I opened up grooveshark.com on the connected computer. I really love GrooveShark, mostly because of it’s radio mode. You can add some tracks, and it then builds a radio station based on similar tracks. That’s great for parties!

So, we were merrily partying along and… Oh wait, no.

I forgot. GrooveShark doesn’t work in Germany.

You know why? Because the GEMA decided the site had to pay €0,13 for each single track, every single time it was played. No wonder that becomes, in the words of GrooveShark itself: “Prohibitively expensive”.

A Little Backstory

First off, Grooveshark operates a little differently from services like Spotify in the following regard; Users can upload their own music to GrooveShark. There is no check on the actual licenses of the files, and/or if the uploader holds the copyrights to that file. However, GrooveShark allows for copyright owners to: a. get payed per play directly (without middle-men) or b. have GrooveShark remove the infringing content.

This places the responsibility of providing proof with the copyright holders. Something I approve of completely.

It has always been such —in any sane legal system, that is— that the prosecutor needed to provide the proof to condemn the prosecuted. Innocent until proven guilty, so to speak. GrooveShark uses the cease-and-desist principle to allow for music distribution until someone cares enough to say something about it. It is a wonderfully elegant solution, since they are well known to most larger labels, and don’t make a secret of it. If you choose not to use GrooveShark, you can ask them to remove your content. If you do use them, you, as the copyright holder, can get paid! Everybody wins.

Besides, don’t take my word for it, GrooveShark has been proven to be a successful business all across the planet, but in Germany, the GEMA decided to make it impossible for them to operate.

How in the world?

How in the world does a country like Germany, with all it’s strict laws against destroying capital, destroying market opportunities, allow one of its state-mandated pawns to bully people out of business? Why do weapons producers, oil companies, chemical companies, pharmaceutical companies and mobile network operators continue to function on the fringes (and often on the other side) of legality? These companies are kept nicely out of reach, under the banner of a free market and the self-regulatory argument.

How can the GEMA destroy a company’s base of income, indeed a whole branch of companies income when there’s no real, actual threat from these companies?

I’m betting it’s their lobbyists.

Yes I am. It’s the large amounts of money behind the existing music industry. The likes of EMI, Universal and Virgin have a strong presence in all kinds of politically connected places. These are the people that want to help out creatives by destroying the platforms that can be used for self-promotion. Platforms from which the artist can benefit directly, without their meddling. Without them earning money of it.

Well, I can tell you, my music is free, and will always be such. Like my software. If only to give these mafia-like organisations the finger. Fuck you, GEMA.

Remove your last git commit from a local repository.

$
0
0

Yeah, we’ve all been there. Committing to master when you wanted to commit to a freshly made branch. So the question is, how do you get rid of these nasty commits you’ve made?

Well, the answer is rather short, but it can be very handy to know. Here it goes:

git reset --soft HEAD~1

Where especially the --soft is cool since that keeps the changes you made to your files, even after the reset.

One thing to keep in mind: If you’ve pushed your changes, this doesn’t work, then you need to use the --hard option.

Happy gitting!


Use RSYNC to delete remote folders

$
0
0

The hosting provider I use offers a backup server. It’s very reliable, but it only supports the SFTP and RSYNC protocols. That’s all fine for regular usage, but when your backup script breaks somehow, and you need to start fresh, SFTP is not an option. Deleting millions of files across can take days.

So, what’s the solution? RSYNC to the rescue! The great file synchronization tool offers many, many options, but for this snippet I’ll keep it simple. As always, first the snippet, then the explanation.

rsync -arv --delete ~/empty_local_folder/ username@remote_server:/path/to/remote/folder/

Requirements

This code requires you have got a folder in your user directory called empty_local_folder. If you don’t have this folder, you can create it by doing mkdir ~/empty_local_folder and be sure to put nothing in it.

Configuration

In the code, you can replace the username and remote_server with your username and remote server name. Same goes for the /path/to/remote/folder/, which contents of which will be deleted.

Explanation

The rsync command takes loads of arguments, but I will stick to the ones used above:

-a The ’archive’ option. This makes sure rsync synchronizes the files, and not just copies them blindly.

-r The ’recursive’ option. Tells rsync to travel down the directory tree and apply changes to all that lies below the /path/to/remote/folder/.

-v The ’verbose’ option. Gives more feedback to the user issuing the command.

--delete The ’delete’ option. This is the most important option for this snippet. It tells rsync not only to update missing files on the remote server, but also to delete files and folders that don’t exist on the local machine. This is, essentially, what makes this snippet work.

Need to play high-fidelity white noise? Listen to /dev/urandom on OSX!

$
0
0

At the FSFE Berlin meet yesterday, one recently-become-father fellow showed us he Chromadoze app on his android phone. This app worked wonders in putting his baby to sleep by playing white noise across his android phone’s speaker. apparently, there’s a lot of people that use white noise either to fall asleep, or to reach a state of utter concentration. (Useful if you want to build a multi-threaded operating system in two hours, for example.)

This got us started on a small discussion on how to do this on desktop computers and tablets. Of course, /dev/random on Linux is perfect for exactly this kind of noise generation. OSX has something similar, called /dev/urandom/ and I wanted to share a snippet with you guys so that you, too, can enjoy the soothing glory of high-fidelity white noise during your next coding spree.

First install sox

Natively, OSX has no /dev/audio or something like it. So you need the sox package, a command-line interface to OSX’ Core Audio. You can get that in various ways, but I’ve found installing it using Homebrew is easiest. First install Homebrew, then you can do brew install sox

The code

cat /dev/urandom | sox -traw -r44100 -b16 -e unsigned-integer - -tcoreaudio

Explanation

First, we take the contents of the random generator by doing cat /dev/urandom/, after which we pipe them to sox with | sox.

Sox takes a couple of options to tell it what kind of data it’s receiving:

-traw Tells sox to consider incoming data as raw, uncompressed audio.
-r44100 Sets the input sampling rate to 44.1 Kiloherz.
-b16 Tells sox the bit-depth for this audio stream is 16 bits.
-e unsigned-integer Says that the raw data should be considere an unsigned integer. (Which are the kind of numbers /dev/urandom outputs.)
- This stray minus sign is very important! It tells sox to take the stream that was piped to it as a source.
-tcoreaudio tells sox to use the ‘coreaudio’ device for output.

Let me know what you do with this!

Home screen icons for both Apple and Android devices

$
0
0

On the FSFE web hackers mailing list there was some confusion about the meaning and implementation of the <link rel="apple-touch-icon-precomposed" /> tag.

The Standard

By its very nature, HTML5 allows for meta-information to be embedded in the document. This can contain a wide range of information like copyright credentials, publication times, validity periods, and many more. Apple (the computer company from the United States) used a tag to indicate an image resource for use as a home screen- and favorite icon for their tablets and other touch devices. This turned out to be easy to implement. The standard was open, compliant and free. So eventually, lots of people were using it, and Android devices now also know how to deal with these tags and their icons.

So, even though Apple created the touch icon standard, and implemented it for use with iPads and iPhones, now most Android devices (namely those from 2.1 on) support the touch icon. This article: “Getting Android to Recognize Apple Touch Icons” explains how. There are some simple requirements, but they’re all handled in the article.

Closed standard? Not really!

There was talk about this being a closed standard, or some endorsement for non-free software. The argument was that if someone were to browse the source code of the FSFE-website, they might get the wrong impression from the presence of the <link rel="apple-touch-icon-precomposed" /> tag. This talk about the touch icon being some kind of closed standard is simply untrue. The standard consists of a standards-compliant HTML tag combined with one or more PNG files. For those of you who don’t know: PNG is an open file format. I really fail to see the closed standard in that.The fact that Apple produces closed-source non-free software should not restrict the use of an open and free standard by their hand. It just happens to be named after the company. A company which also contributes code to WebKit, but apparently nobody considers calling the standard ‘free’ because of that. That’s inconsistency right there, people.

And before you all start about the HTML-tag not being standards compliant —because you dumped it in the W3C-Validator and it didn’t pass— please read this part of the HTML5 specification “4.2.5.2 Other metadata names” first.

All in all, there’s a lot of F.U.D. being spread here to no real avail. I really don’t like that. Knowledge should always trump gut-feeling. Even though you feel Apple is evil, be composed and rational about it. Taking away freedom from people is its own argument, you really don’t need to also become some zealous nutbag to drive the point home.

My code suggestion

My code for this block is as follows:

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/apple-touch-icon-144x144-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/apple-touch-icon-114x114-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/apple-touch-icon-72x72-precomposed.png" />
<link rel="apple-touch-icon-precomposed" href="img/apple-touch-icon-57x57-precomposed.png" />
<link rel="shortcut icon" href="img/favicon.ico" />

Note: The loading order of these icons is important, since it gracefully degrades along with compatibility of the device.
Also note: The missing ‘sizes’ attribute in the last touch-icon ‘rel’ tag, that is for compatibility with older iPhones:

Viewing all 11 articles
Browse latest View live




Latest Images