blog.olapersson

Created, borrowed or just stolen
littlebigdetails:

OS X - Option-click Sound icon in the menu bar to change sound output and/or input quickly.
/via naveen

New to me, extremely handy (i switch between internal, apple tv and sound card fairly frequently)

littlebigdetails:

OS X - Option-click Sound icon in the menu bar to change sound output and/or input quickly.

/via naveen

New to me, extremely handy (i switch between internal, apple tv and sound card fairly frequently)

Multi file search/replace in vim

Fot future reference

:args app/views/manager/*/*
Selects files for use in..

:argdo %s/class=”\([a-z0-9_ ]\+\)”/\=’class=”’.substitute(submatch(1), ‘\([a-z0-9_]\+\)’, ‘m_\1’, ‘g’).’”’/ge | update
…argdo, which can take a regex, then pipe into update to save the file(s).

Regex breakdown.
%s/class=”\([a-z0-9_ ]\+\)”/\=’class=”’.substitute(submatch(1), ‘\([a-z0-9_]\+\)’, ‘m_\1’, ‘g’).’”’/ge
In this exemple I’m prefixing all class names with “m_”.

/class=”\([a-z0-9_ ]\+\)”/
match class=”<classes>” and return <classes> in submatch 1.

\=’class=”’.substitute(submatch(1), ‘\([a-z0-9_]\+\)’, ‘m_\1’, ‘g’).’”’
\= interpolates strings in ” with functions. Here I run substitute() on submatch(1) to prefix all classnames contained with m_.

In August&#8230;
photojojo:

The time a million lovely hot air balloons lifted off, and Valentina was there to capture it! In Cappadocia, Turkey. 
via 1wantchange

In August…

photojojo:

The time a million lovely hot air balloons lifted off, and Valentina was there to capture it! In Cappadocia, Turkey. 

via 1wantchange

Fictive Kin: The Joke's On Us?

fascinated:

fictivekin:

The biggest April Fools’ joke this year isn’t actually a joke. It’s a true story of needlessly wasted content, frustrated users, and a less-than-graceful exit.

Graceful Exits

Yesterday, on the heels of its acquisition, popular recipe site Punchfork closed its doors. This kind of acquisition…

Worth reading, Internet.