Categories
English Feeds

Axel Beckert: grep everything

During the OpenRheinRuhr I noticed that a friend of mine didn’t know
about zgrep and friends. So I told him what other grep
variations I know and he told me about some grep variations I didn’t
know about.

So here’s our collection of grep wrappers, derivatives and variations.
First I’ll list programs which search for text in different file
formats:

grep through what Fixed Strings Wildcards / Basic RegExps Extended RegExps Debian package
uncompressed text files fgrep grep egrep grep
gzip-compressed text files zfgrep zgrep zegrep zutils, gzip
bzip2-compressed text files bzfgrep bzgrep bzegrep bzip2
xz-compressed text files xzfgrep xzgrep xzegrep xz-utils
uncompressed text files in installed Debian packages dfgrep dgrep degrep debian-goodies
gzip-compressed text files in installed Debian packages dzgrep debian-goodies
PDF documents pdfgrep pdfgrep
POD texts podgrep pmtools
E-Mail folder (mbox, MH, Maildir) mboxgrep -G mboxgrep -E mboxgrep
Patches grepdiff grepdiff -E patchutils
Process list pgrep procps
Gnumeric spreadsheets ssgrep -F ssgrep ? gnumeric
Files in ZIP archives zipgrep unzip
ID3 tags in MP3s taggrepper taggrepper
Network packets ngrep ngrep
Tar archives targrep / ptargrep perl (Experimental only for now)

And then there are also greps for special patterns on more or less
normal files:

grep for what uncompressed files compressed files Debian package
PCRE (Perl Compatible Regular Expression) pcregrep (see also the grep -P option) zpcregrep pcregrep
IP Address in a given CIDR range grepcidr grepcidr
XPath expression xml_grep xml-twig-tools

One question is though still unanswered for us: Is there some kind of
meta-grep which chooses per file the right grep from above by looking
at the MIME type of the according files, similar to xdg-open.

Other tools which have grep in their name, but are too special to
properly fit into the above lists:

  • ext3grep: Tool to help recover deleted files on ext3
    filesystems
  • xautomation: Includes a tool named visgrep
    to grep for subimages inside other images.

Includes contributions by Frank Hofmann and Faidon Liambotis.

Categories
English Feeds

Francois Marier: Ideal OpenSSL configuration for Apache and nginx

After recently reading a number of SSL/TLS-related articles, I decided to experiment and look for the ideal OpenSSL configuration for Apache (using mod_ssl since I haven’t tried mod_gnutls yet) and nginx.

By “ideal” I mean that this configuration needs to be compatible with most user agents likely to interact with my website as well as being fast and secure.

Here is what I came up with for Apache:

SSLProtocol TLSv1
SSLHonorCipherOrder On
SSLCipherSuite RC4-SHA:HIGH:!kEDH

and for nginx:

ssl_protocols  TLSv1;
ssl_ciphers RC4-SHA:HIGH:!kEDH;
ssl_prefer_server_ciphers on;

Cipher and protocol selection

In terms of choosing a cipher to use, this configuration does three things:

Testing tools

The main tool I used while testing various configurations was the SSL labs online tool. The CipherFox extension for Firefox was also quite useful to quickly identify the selected cipher.

Of course, you’ll want to make sure that your configuration works in common browsers, but you should also test with tools like wget, curl and httping. Many of the online monitoring services are based on these.

Other considerations

To increase the performance and security of your connections, you should ensure that the following features are enabled:

  • SSL session caching with a session store shared between all of your web servers
  • HSTS headers to let browsers know that they should always visit your site over HTTPS
Note: If you have different SSL-enabled name-based vhosts on the same IP address (using SNI), make sure that their SSL cipher and protocol settings are identical.
Categories
English Feeds

Transportation stuff from delicious

[INFOGRAPHIC] 100 Year Old Infographics

A new exhibit at London’s Transport Museum, features a whole bunch of infographic posters all arguing the benefits of public transportation in a decidedly early 1900s style.

Here we are barrelling towards 2012 and living in the future. We invented the Internet, we invented social media, we invented FarmVille, we probably invented too, right? Wrong. Infographics have been around for a long while, as far back as early last century and probably even further back than that. , features a whole bunch of infographicy posters all arguing the benefits of public transportation in a decidedly early 1900s style.

Here we are barrelling towards 2012 and living in the fut …


[INFOGRAPHIC] The Greenest Way to Travel

With Benzinga’s Value Investor, you will receive expert analysis of the most under-the-radar stocks and learn about unique opportunities for realizing profits through long-term trades with minimal downside risk. Try Value Investors free today!

Categories
English Feeds

World Population: Where it’s thick and where it’s thin

World Population: Where it’s thick and where it’s thin: “”

(Via The Big Picture.)

Categories
English Feeds

Abusing HTTP Status Codes to Expose Private Information

When you visit my website, I can automatically and silently determine if you’re logged into Facebook, Twitter, GMail and Digg. There are almost certainly thousands of other sites with this issue too, but I picked a few vulnerable well known ones to get your attention. You may not care that I can tell you’re logged into GMail, but would you care if I could tell you’re logged into one or more porn or warez sites? Perhaps http://oppressive-regime.example.org/ would like to collect a list of their users who are logged into http://controversial-website.example.com/?

Ignoring the privacy implications for a second, as a website developer, you might like to know if your visitors are logged into GMail; you could use that information to automatically fill the email fields in your forms with “@gmail.com”… Perhaps you might want to make your Facebook “like” buttons more prominent if you can tell your visitor is logged into Facebook at the moment? Here’s how I achieve this:

…read more

Categories
English Feeds

Trouble

It’s far easier to stay out of trouble than to get out of trouble.

Thanks Robert

Categories
English Feeds Fun

CodeSOD: The Query of Despair

Jeroen's colleague had the misfortune of being assigned to debug an intermittent, unspecified error in the one of the oldest of the legacy applications. "The good news is that I've isolated it to a database query," he told Jeroen, "the bad news is that I've isolated it to a database query."

Knowing that his colleague wasn’t a big fan of databases, Jeroen offered his assistance. In response, he received the following image.

"I don't think anyone can help me," the his colleague wrote.


Categories
English Feeds

The 147 Corporations Controlling Most of the Global Economy

rubycodez writes “Researchers at the Swiss Federal Technology Institute in Zurich have identified a ‘Capitalist Network’ [PDF] of well-connected companies that control most of the global economy. They further identified the 147 ‘super-connected’ companies that control forty percent or more of the global financial network. If one believes the mega-corporations have most governments of the west in their pockets, does this mean we have a global oligarchy?”

Read more of this story at Slashdot.

Categories
English Feeds

youngna: In Honshu, the Japanese Alps, where there’s 56 feet of snow

youngna:

In Honshu, the Japanese Alps, where there’s 56 feet of snow.

Categories
English Feeds

Scientists are from Mars, the public is from Earth

The American Geophysical Union blog has a link up to a very interesting table, and I feel strongly enough about this topic that I want to share it with you. It’s a list of words scientists use when writing or otherwise communicating science, what the scientists mean when they use that word, and most importantly what the public hears.

[Click to enverbumnate.]

I’ll admit, when I read it I laughed. But then my chuckle dried up when I realized just how dead accurate this is. And the smile pretty much left my face when I read that this table is from an article called "Communicating the Science of Climate Change," by Richard C. J. Somerville and Susan Joy Hassol, from the October 2011 issue of Physics Today.

Yup. I think they have a pretty good point.

My career at the moment could pretty much be called "Science Communicator". I do it here on this blog, I do it on Blastr and in Discover magazine, and when I give talks. Before that (and I guess it’s an occupation that never really leaves you) I was a professional scientist for many years. My training ran deep: 4 years undergrad, 6-7 in grad school, then a decade or so of research after that. I could toss around the phrase "Don’t over-iterate the Lucy-Richardson deconvolution algorithm or else you’ll amplify the noise and get spurious data spikes" with the best of ‘em.

As a science writer, though, I can’t use that! I have to say, "Cleaning up a digital image means using sophisticated mathematical techniques that can sometimes mess the image up and fool you into thinking something’s there that really isn’t."

I hope you can appreciate the difference.

So when I write, I try pretty hard to make the science topic accessible without "dumbing it down". I assume my reader is intelligent, but unfamiliar with the concepts I might be discussing. I try to define words if a reader might not know them, or link to someplace they can get more info if they need it.

But as that table shows, there are plenty of words I use all the time that someone else might know, and think means something else. And this is incredibly important, especially if a science writer — as happens more and more often these days — needs to defuse some sort of political spin thrust upon a topic. A classic example in the wholly-manufactured Climategate "controversy". A lot of hot air was generated over the use of the word "trick" in the stolen emails — which most people interpreted as meaning the scientists did something underhanded and sneaky to hide something important. In reality, we use that word to just mean a method of doing something that’s clever. It’s like saying, "The trick in never losing your car keys is to always hang them on a hook by the door that leads outside." See the difference?

But over that, political battles are won or lost.

There are times I fret over a word in a post. It took me a while to start using the word "denier" instead of "skeptic", for example, but the difference is important. I’ve fought for years to teach people that skepticism is not cynicism or denial; it’s asking for and looking at evidence logically and rationally (in a nutshell). What’s funny is that now the media uses phrases like "climate skeptic" when talking about some people who are not skeptics, in that they are not looking at the evidence logically and rationally. They look at evidence so they can figure out how to spin it, cast doubt in the mind of the public over something that is actually a fact.

That’s why I call it "denial". The word fits, and I intend to continue using it when it does.

I could go on and on.

But here’s the point: communication isn’t simply casting out information from atop a tower. There are two parts to it: presenting an idea to someone, and them understanding it. Sometimes we have to change the way we word things to make that second half happen. Otherwise we’re shouting all the facts in the Universe to an empty room.

Tip o’ the thesaurus to Joanne Manaster.