Zznippets

The log: The lifeblood of your data pipeline - O'Reilly Radar

April 30, 2015

via http://radar.oreilly.com/2015/04/the-log-the-lifeblood-of-your-data-pipeline.html

Interesting article. I hadn’t heard of Fluentd, looks useful.

oreilly_radar_fluentd_1
The old paradigm — machines to humans, and the new — machines to machines. Image courtesy of Kiyoto Tamura.
Over the last decade, the primary consumer of log data shifted from humans to machines.
Software engineers still read logs, especially when their software behaves in an unexpected manner. However, in terms of “bytes processed,” humans account for a tiny fraction of the total consumption.
image from The log: The lifeblood of your data pipeline - O'Reilly Radar

Mac keyboard shortcuts by Matt Gemmell

May 16, 2014
Another great article by Matt Gemmell. I knew most of them, but learned a few things. The golden part for me were the third-party utilities, in particular Shortcat, which I didn’t know and is amazing:

It’s basically Spotlight but for all visible controls and objects on the screen: it’s type-to-select for *everything you can see*.


The whole article is worth a read.

Working from home - Matt Gemmell

May 7, 2014
Great article.

I’ve been working from home full-time for more than seven years, and running my own business for the same amount of time. Many of us at least have the opportunity to occasionally work from home, and I daresay that many people would like the chance to do so permanently.
It’s not just as straightforward as pulling out a laptop in the living room, though. Working from home has a number of difficulties and challenges. In many ways, it’s a battle for mastery of yourself. I’d like to talk about a few of the issues I’ve faced, and how I handle them.

Explanation of temperature scales

January 17, 2014

This is because Fahrenheit is based on a brine scale and the human body. The scale is basically how cold does it have to be to freeze saltwater (zero Fahrenheit) to what temperature is the human body (100-ish Fahrenheit, although now we know that’s not exactly accurate). Fahrenheit was designed around humans.

Celsius and Kelvin are designed around the natural world.

Celsius is a scale based on water. Zero is when water freezes, 100 is when water boils.

Kelvin uses the same scale as Celsius (one degree, as a unit, is the same between the two), but defines zero as absolute zero, which is basically the temperature at which atoms literally stop doing that spinning thing. Nothing can exist below zero Kelvin. It’s the bottom of the scale.

So.
Fahrenheit: what temperatures affect humans
Celsius: what temperatures affect water
Kelvin: what temperatures affect atoms
image from Explanation of temperature scales

Six-Legged Giant Finds Secret Hideaway, Hides For 80 Years : Krulwich Wonders... : NPR

March 2, 2012
 

The story is simple: A bunch of black rats almost wiped out a bunch of gigantic bugs on a little island far, far away from most of us. A few dedicated scientists, passionate about biological diversity, risked their lives to keep the bugs going. For the bugs to get their homes and their future back doesn't depend on scientists anymore. They've done their job. Now it's up to the folks on Lord Howe Island.

image from Six-Legged Giant Finds Secret Hideaway, Hides For 80 Years : Krulwich Wonders... : NPR

How to remove a subproject/submodule to a git-svn repository

January 25, 2012

To sum up, you delete the offending directory and then run something to the effect of

git filter-branch --index-filter \
'git rm --cached --ignore-unmatch path/to/the/formerly/misbehaving/module'

I accidentally added another git repository to a git-svn repository, which makes it die when trying to push the changes. This technique helped me fix it. Documenting mostly so I remember when it happens again sometime.

nwdiag - simple network-diagram image generators — blockdiag 1.0 documentation

January 23, 2012

nwdiag generates network-diagram image file from .diag file. .diag file is similar to DOT file (graphviz’s).

You can get diagrams like this.

None

Very useful, like Graphviz but specifically for network diagrams. You can probably obtain the same result with Graphviz with the appropriate amount of dot magic, but nwdiag makes this very easy. Other useful graph types in sister projects: http://blockdiag.com/en/index.html

image from nwdiag - simple network-diagram image generators — blockdiag 1.0 documentation

Osaka Station City fountain

September 14, 2011

This is making the rounds, so I might as well contribute. Beautiful (and maybe not so hard to do - it's much like a dot-matrix printer, but printing from bottom up). I saw one of these a few years ago at the Motor Show in Geneva (at the Jeep stand), but it was much lower resolution and much less creative.

Pidgin cannot connect to MSN: the certificate chain presented is invalid

November 18, 2010
1. Deleted all msn/live/hotmail certificates in the folder
2. went to
https://omega.contacts.msn.com using fire fox (https not http)
3. right click > view page INFO > Security Tab > View Certificate Button > Details Tab > Export Button
4. Saved the file to ~.purple/certificates/x509/tls_peers/omega.contacts.msn.com
5. Reconnected
6. Perfect

Like many people, I started getting certificate errors when connecting to my MSN account using Pidgin. The straightforward fix described (delete certificate, reconnect to fetch the new one) didn't work for me with Pidgin 2.7.5 under Windows 7, but this slightly-more-convoluted technique worked fine.

Pac-Man Spotted In The Wild

October 2, 2010

Jaime "Kalapusa" Margary, who's given us realistic Piranha Plants, and Super Mario fungi in the past, now turns his attention to Pac-Man, presently soaking in jar of formaldehyde.

Writes Jaime:

The idea behind the video is Pac Man's final days, free from the maze (kudos if you can guess who's castle that is) and eating pellets to his heart's content in a glowing pellet forest. His dead, bloated body is found afterwards and then delivered to 8-Bit Labs.

The Texas Sharpshooter Fallacy « You Are Not So Smart

September 14, 2010
If you have a human brain, you do this all of the time. Picking out clusters of coincidence is a predictable malfunction of normal human logic.

We see patterns everywhere, our brain is hardwired to do it. Most of them are harmless or even beneficial. The problem is when people start assigning meaning to the patterns, as explanation of whatever they want to believe or to convince other people of (such as "vaccines cause autism", which is completely false).

On remembering and dealing with people's names

September 3, 2010
A person's own name is the single most important word to him/her; it is intimately tied to his/her identity as an individual. How you deal with people's names can have a profound effect on their impressions of you: Think about the times you've felt special when someone you admired addressed you by your name in a sincere tone; or think about the times when you've felt belittled when someone negligently called you by the wrong name, or worse, maliciously made fun of your name in front of you.

I've always been extremely bad at remembering people's names, and it's caused me my fair share of embarrassment during my life. While I lived in Switzerland, I was always amazed at how well people in general could remember names. I don't know if they train them for it, or if it's a cultural trait, but many times, for example, I was greeted by name by people I only met briefly weeks before at a party. By then, I could barely remember their faces! Lately I've been making an effort to consciously remember people's names, and it does have a positive effect, both on myself and on other people.

Drowning Doesn't Look Like Drowning

July 7, 2010
of the approximately 750 children who will drown next year, about 375 of them will do so within 25 yards of a parent or other adult. In ten percent of those drownings, the adult will actually watch them do it, having no idea it is happening (source: CDC). Drowning does not look like drowning

This is an eye-opening article for me. Not having actually watched anyone drown (fortunately), I had the impression that someone drowning would trash madly as shown on TV and movies. This is knowledge that can actually save lives! I think everyone should read this, particularly parents.

How’s that for a low price guarantee?

March 17, 2010
Media_httpfarm3static_exmgg

Great sense of humor (follow the link for more signs from the same store). Reminds me of the signs in a Shakey's Pizza place where we used to go when I was a kid. Two I remember:
"We have a deal with the bank. The bank doesn't make pizza, and we don't take checks."
"If you would like to use your plate for your cigarette ashes, please ask the waiter to serve your pizza in the ashtray"

image from How’s that for a low price guarantee?

How to make the LG BD370 region-free

February 23, 2010
The instructions below apply to the LBD 370 & 360.

How to make the LG BD370 region-free (mine came set to "All regions" for Blu-Ray, but not for regular DVD). For the most complete instructions, see the post by BoriMar, February 06 2010. One change: I had to burn the contents of 6000.zip to a CD for it to recognize it, putting it in the USB drive didn't work, but the down/upgrade files worked fine from the USB drive. I burned the CD using the built-in capabilities of Windows Vista, just making sure to check the options for "mastered" format, and to close the session on ejecting the CD.

xkcd - A Webcomic - Scary

October 9, 2009

Scary indeed. From the alt text "I'm teaching every 8-year-old relative to say this, and every 14-year-old to do the same thing with Toy Story. Also, Pokemon hit the US over a decade ago and kids born after Aladdin came out will turn 18 next year."

I feel old.

image from xkcd - A Webcomic - Scary

Going home

September 7, 2009
Thirteen years ago, I left Mexico to study a Ph.D. in the U.S. In the meantime, apart from doing that, I got married, we moved to Switzerland, and we formed a beautiful family. I have learned so many things, I have changed in so many ways. In the words of my advisor, during one of our very early email exchanges, before I went to Purdue:

It isn't so much a leaving as a beginning of something else.  When you return, as you will, it will be with a more wordly viewpoint.  That is both a loss and a gain.

Now, after all these years, it's time to go home.

Synchronizing 1Password data between two local accounts (howto)

September 29, 2008
I am a big fan of the incredibly useful 1Password. The latest beta release (2.8.3.BETA-11) introduces a new keychain format that, among other things, allows 1Password to detect changes made to the file by other programs and reload the changes on the fly. I am using this now to keep my 1P data synchronized between my work and personal accounts on my machine. Here's what I did:

  1. In my work account (dza), switch to the AgileKeyChain format by following the instructions.
  2. Modify the ACL for my ~/Library/Application Support/1Password/ folder to allow my personal account (zamboni) read/write access. I did this using the "Sharing & Permissions" section of the Info dialog for the folder, and then choosing "Apply to enclosed items" from the cogwheel menu in that same section.
  3. Switch to my personal account.
  4. Quit 1Password, run the defaults command from the instructions, restart 1Password.
  5. Export my existing 1Password data in the "1Password Interchange file" format. To do this, choose File -> Export all -> 1Password Interchange File, and save it to a file in my desktop.
  6. Double click /Users/dza/Library/Application Support/1Password/1Password.agilekeychain and click "yes" to start using that file.
  7. Import the data from step 5: File -> Import, and follow the prompts. Wait for the data to import.
  8. Switch back to my work account and verify that the imported items are seen there as well.

Adding growl notification to Raymond Page's bash prompt code

September 8, 2008

Update (2008/09/10): Giles Orr kindly pointed out that he is not the author of the bash prompt package I use, I have updated to give proper credit to the author, Raymond Page.

For some time I have used Raymond Page's bash prompt code (heavily based on the work by Giles Orr in the Bash Prompt HOWTO, you can get it at http://gentoo-wiki.com/TIP_Prompt_Magic or http://code.google.com/p/homenix/source/browse/, you need to get .prompt, .prompt_functions and .prompt_config from the trunk/ directory), which I like very much because it is highly customizable, and although a lot of the functions are Linux-specific, it can easily be made to work on Mac OS X. It features context-dependent prompt colorization (e.g. based on whether the current directory is writable and on the machine load), automatic shortening of the prompt based on window width, and many other features.