Dispatches

get list of functions in bash script…look for those in argv

# Get function list as array
funcs=($(declare -F -p | cut -d " " -f 3))

# parse out functions and non-functions
i=1
declare -a cmdargs
declare -a otherargs
for var in "$@"; do
    if [[ " ${funcs[@]} " =~ " ${var} " ]]; then
        cmdargs[i]=${var}
    else
        otherargs[i]=${var}
    fi

    ((i++))
done

echo ${cmdarg[*]}
echo ${otherargs[*]}

Rewrite git repo URLs

A question in a mail list I’m on introduced me to a git feature that was very new to me: it’s possible to have git rewrite the repository URLs to always use HTTPS or git+ssh, etc.

This one-liner seems to force https:

git config --global url.https://github.com/.insteadOf git://github.com/

Or you can add these to your .gitconfig:

# Use https instead of git and git+ssh
[url "https://github.com/"]
  insteadOf = git://github.com/
[url "https://github.com/"]
  insteadOf = git@github.com:
# Use git and git+ssh instead of https
[url "git://github.com/"]
  insteadOf = https://github.com/
[url "git@github.com:"]
  pushInsteadOf = "git://github.com/"
[url "git@github.com:"]
  pushInsteadOf = "https://github.com/"
Casey Bisson

How Jackie Chan wins

Tony Zhou’ video is genius, as are the nine principles of action comedy he’s identified:

  1. Start with a DISADVANTAGE
  2. Use the ENVIRONMENT
  3. Be CLEAR in your shots
  4. Action & Reaction in the SAME frame
  5. Do as many TAKES as necessary
  6. Let the audience feel the RHYTHM
  7. In editing, TWO good hits = ONE great hit
  8. PAIN is humanizing
  9. Earn your FINISH

Read the full video description for more, and consider donating to support his work.

Deliverables, iteration, and constraints

When asked to give a timeline for project delivery, my first questions, of course, are about the details of the project. Then, I take a guess about the timeline and double it, and fight like hell to eliminate blockers and distractions for the team, work with them on implementation theories, ask leading questions that help balance […] » about 400 words

Casey Bisson

Google’s link policies raise hell for simple bloggers

I get a bunch of emails like this: We have recently received a notification from Google stating that our website has unnatural links pointing towards it. This has affected our rankings on Google and as a result, we’re trying to clear things up. Our website URL is www.builddirect.com. We noticed the following links are pointing […] » about 300 words

Disclaimer in spam message

You are receiving this e-mail because we just received a mass e-mail and the sender forgot to blind cc your addresses. We will only be sending this one e-mail so as to not pester you, so please contact us if you would like more information.

MySQL performance tips from around the web

Gospel: use InnoDB, never MyISAM It seems everybody on StackExchange is singing from the same gospel: “[How can I] prevent queries from waiting for table level lock?” Answer: use InnoDB. The major advantages of InnoDB over MyISAM. “Even in a read-intesive system, just one DELETE or UPDATE statement will quickly nullify whatever benefits MyISAM has.” […] » about 400 words

Manhattan Project tours

It’s easy to forget that plutonium, the incredibly radioactive element at the core of the first atomic detonation, was only identified in 1941. Two years later Army Corps of Engineers started construction of Reactor B to produce it in industrial quantities. Today,  Reactor B is a National Historic Landmark, and one of only a few locations […] » about 400 words

Casey Bisson

Where on earth can I get an weotype list?

It’s not like these aren’t documented, but I keep forgetting where.

WOEID place types:

$woetype = array(
	'7'  => 'town',
	'8'  => 'state-province',
	'9'  => 'county-parish',
	'10' => 'district-ward',
	'11' => 'postcode',
	'12' => 'country',
	'19' => 'region',
	'22' => 'neighborhood-suburb',
	'24' => 'colloquial',
	'29' => 'continent',
	'31' => 'timezone',
);

They can be queried via YQL:

<?xml version="1.0" encoding="UTF-8"?>
&lt;placeTypes xmlns="http://where.yahooapis.com/v1/schema.rng" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:start="0" yahoo:count="1" yahoo:total="1">
	 &lt;placeType yahoo:uri="http://where.yahooapis.com/v1/placetype/35" xml:lang="en-us">
	 	 &lt;placeTypeName code="35">Historical Town&lt;/placeTypeName>
	 	 &lt;placeTypeDescription>A historical populated settlement that is no longer known by its original name&lt;/placeTypeDescription>
	 &lt;/placeType>
&lt;/placeTypes>

Dynamic range vs. price and brand

Dynamic range is what keeps skies blue while also capturing detail in the foreground. Without enough dynamic range, we’re forced to choose between a blue sky and dark foreground, or properly exposed foreground and white sky. I’ve been using multiple exposure HDR techniques to increase the dynamic range I can capture, but multiple exposures don’t […] » about 400 words

On gamification

Stowe Boyd, remarking on the Pew Internet Project report on Gamification in which he was quoted:

The need for a renewed push in the enterprise to reengage every person with their personal work, to find meaning and purpose, has never been greater. But adding badges to users’ profiles on whatever work management tool the company is on, showing that Bette is a super expert customer support staffer, or whatever, is the shallowest sort of employee recognition, like giving out coffee mugs to the folks with the lowest number of sick days.

Shutterfingers works!

I mentioned my plans to make a servo controller to mechanically press the shutter button on a camera when signaled from a motion control timelapse robot. The parts have arrived and it’s running on a breadboard. I’ve had to make a few changes to the code, including fixing a variable reference, but the biggest change […] » about 200 words

Lumix LX3 sample photos

A friend was asking about the Lumix LX7 I named in my camera roundup the other day and earlier this year. I keep the LX7 in the list because of my experience with it’s predecessor a couple generations earlier: the Lumix LX3. He asked how it performs, but I struggled at first to find photos demonstrating […] » about 400 words

Built For A Purpose: Geographical Affordances and Crime

In Cabinet spring 2013, Geoff Manaugh investigates the relationship between geography and the crimes that geography affords. In the 1990s, Los Angeles held the dubious title of “bank robbery capital of the world.” At its height, the city’s bank crime rate hit the incredible frequency of one bank robbed every forty-five minutes of every working […] » about 300 words

3rd party JS libraries cause downtime

Facebook Connect went down hard tonight. HuffPo reports that their site was redirecting to a Facebook error page, even when people weren’t attempting to log in.

It makes me more comfortable with our decision to strip so many 3rd party javascripts from GigaOM during our last redesign.

Strange things running on my Mac

My iMac screen is dark and isn’t lighting up like I expect it to when I tap the keyboard. I can, however, SSH into it and see what it’s doing when not responding to me.

I found GoogleSoftwareUpdateAgent running, this FAQ item vaguely tells me it’s part of Chrome, and that if I try to uninstall it without also uninstalling Chrome it will simply “be reinstalled after a few hours.”

Two instances of PTPCamera are running. This may be related to Picture Transfer Protocol used in some cameras and has caused more than a few people to ask why it’s running.

com.apple.iCloudHelper is using a lot of CPU (100% of one of the cores). Googling for it reveals other people inspecting their systems while the screen refuses to awaken. I’m guessing it’s related to, um, iCloud and syncing, but the interwebs don’t say much more about it and killing it didn’t fix the problem.

Geography vs. Stereotypes

Alphadesigner is trying to put a finger on it with his Mapping Stereotypes series. Others, including how Americans see Europe and the world according to America, are not nearly as well designed. We’d be fools, however, to think we invented the idea of mapping our prejudices. This Flickr set of maps from 1870 through 1915 is good evidence of that. » about 100 words

Be Careful What You Measure

Seth Godin on what to obsess over:

What are you tracking? If you track concepts, your concepts are going to get better. If you track open rates or clickthrough, then your subject lines are going to get better. Up to you.

It’s long something I’ve believed: if you measure it, you will attempt to maximize it, even if the metric is something you’d rather minimize, like CO2 emissions.