Entries Tagged 'bug' ↓

Valid JSON

FYI, for the geeks out there, even though:

{ foo: 'bar' }

Is a valid way to initialize a javascript object, it is not valid JSON. In JSON, the key and string values have to be double quoted:

{ "foo": "bar" }

This matters because jQuery 1.4 uses native parsing and the getJSON method will silently fail on malformed files.

Yuck

  • Share/Bookmark

Stupid Find

This command should work, imho:

$file = ~/personal/private/.htaccess;
find ~/ -name .htaccess -type f -exec diff $file {}
              \|\| ( echo 'Replacing: ' {} \&\& rm {} \&\& ln -s $file {} )\;

It should hunt down all the copies of my .htaccess files that are only there to password protect a directory and make them symlinks to an authoritative version.

There are many ways to accomplish the task and is apparently not one of them. ☺

  • Share/Bookmark