sonia hamilton – life on the digital bikepath – sonia@snowfrog.net

24 July 2009

git – ignore vim temporary files in all directories

Filed under: Uncategorized — Sonia @ 12:42

Up until a few weeks ago I was using subversion for all my personal stuff. But then I got fredded when my free subversion hosting (xp-dev.com) went down for a few days, so I’ve moved to git. Yay, no more central repository to go down…

To ignore files in git you use .gitignore, eg for a rails project:

% cat .gitignore
log/*.log
tmp/**/*

But how to ignore files in all directories? Use .git/info/exclude. For example, to ignore all temporary files generated by vim:

% cat .git/info/exclude
.*.sw*

All the howto’s I’ve read so far mention .gitignore but not .git/info/exclude – I stumbled across this by accident. More RTFM’ing to do…

Correction

To ignore all files in all directories, .gitignore can be used. A bit of experimentation and reading of man gitignore shows that any wildcard that doesn’t contain a / will apply to that directory and all child directories.

.gitignore is propagated during clone operations, whereas .git/info/exclude isn’t ie use the former for common settings and the latter for personal settings.

From the manpage:

Patterns which should be version-controlled and distributed to other repositories via clone (i.e., files that all developers will want to ignore) should go into a .gitignore file. Patterns which are specific to a particular repository but which do not need to be shared with other related repositories (e.g., auxiliary files that live inside the repository but are specific to one user´s workflow) should go into the $GIT_DIR/info/exclude file. Patterns which a user wants git to ignore in all situations (e.g., backup or temporary files generated by the user´s editor of choice) generally go into a file specified by core.excludesfile in the user´s ~/.gitconfig.

16 July 2009

netapp – disabling and deleting snapshots

Filed under: Uncategorized — Sonia @ 16:50

Netapp volumes by default are created with snapshots turned on; if the volume is being used for backups (for example), the snapshots just use up space. Here’s how to delete them:

df vm_dev                     # see space usage for vm_dev volume
snap sched vm_dev             # see the current snapshot schedule
snap sched vm_dev 0 0 0       # zero out the current schedule
vol options vm_dev nosnap on  # disable snapshots (not required, but "belts and braces")
snap delete -a vm_dev         # delete all old snapshots

On a multi terabyte volume, the actual deletion can take a while – don’t expect the space to return immediately…

See Netapp’s “Data Protection Online Backup and Recovery Guide” for more details.

17 June 2009

Another year, another Sydney Film Festival

Filed under: Uncategorized — Sonia @ 15:25

Another year, another Sydney Film Festival. Two films I saw really stood out – The Cove (about the continued Japanese dolphin slaughter) and Che Part I and Part II (covering the Cuban and Bolivian years of Ernesto ‘Che’ Guevara). Also memorable was Big River Man, about a middle aged  Slovenian man who swims the entire length of the Amazon river.

Like always (this is my approx 15th festival), I start the festival with feelings of both anticipation and trepidation – anticipation that I’ll see some great films, and trepidation at the long nights and weekends in the dark, followed by getting up in the morning for work :-) But there’s nothing like seeing a great movie with several thousand other cineastes in the splendour of the State Theatre to renew my love of good cinema.

The Cove works at multiple levels. Firstly we’re made to enjoy the almost James Bond nature of the film makers’ mission, as the team try to infiltrate the area where the slaughter takes place in Taiji, Japan – think spies and decoys, cameras disguised as rocks, and run-ins with guards. Then we’re made to feel revulsion at the killing of these animals that are so like us – they love their freedom, get happy, sad, even commit suicide, and most of all are sentient (as in “having self awareness”). The scenes of the actual slaughter are gut-wrenching – thousands of dolphins are herded into a 100m wide cove and killed by hand with harpoons. Dolphins in their death throws spin around in circles screaming, thrashing their tails, and even jumping onto land. The blood filled seawater turns opaque and divers feel their way along the seabed by hand, searching for carcasses.

But then the film starts to ask some deeper questions. First of all, dolphin meat contains high levels of mercury due to pollution and is basically poisonousness and unsaleable. Eating meat with these levels of mercury leads to large numbers of horrendous birth defects – which the Japanese unfortunately became aware of in the 70’s – a whole generation of birth defects forcing the closure of  many polluting industries in Japan. So why keep up with the “harvest”, even if the meat has to be foisted onto the Japanese public via illegal meat substitution and Yakuza links? The answers seem to involve dirty international politics and ugly right wing Japanese nationalism.

Secondly, inorganic pollutants are concentrated as we move up the predator-prey cycle, and dolphins (like wolves, lions, humans) are at the top of the food chain. Dolphin meat contains so much mercury that it’s inedible – what about us? How is that we can poison our environment so much that we’re poisoning ourselves?

8 April 2009

Ditch the Hummer, here comes the PUMA

Filed under: Uncategorized — Sonia @ 09:04

An article in today’s SMH – Ditch the Hummer, here comes the PUMA – along with a jaunty photo of metrosexual darting through traffic. Looks like it combines the disadvantages of a car (cost, need to fuel, too heavy to put on your shoulder) with the disadvantages of a bicycle (cold/hot, wet, you actually work up a sweat) without the fun of a motorcycle (speed – yeh baby!).

Yawn. I’ll stick to my bicycle/car/dreams of hopping back on a motorbike. And keep using public transport whenever I can.

28 March 2009

Andre may have to go…

Filed under: Uncategorized — Sonia @ 08:00

This financial crisis is forcing companies to make tough decisions, there is a risk that we might need to lay off Andre…

Andre may have to go...

Andre may have to go...

(Tip-of-the-hat to J).

In a similar vein, an article in today’s SMH on NSW’s health system begins:

A decision had been made, he wrote, to set up a new unit within the emergency department… The unit will be … four beds, conceptually down the right hand wall of ED but using the concept of ‘virtual beds’,” he told colleagues. Patients who arrived at emergency and needed admission would be assigned a virtual bed if no official in-patient bed was available, remaining physically in emergency.

6 March 2009

CityFail does it again…

Filed under: Uncategorized — Sonia @ 08:09

“RailCorp is threatening a Sydney man with legal action after he created an iPhone application that allows people to monitor timetables for Sydney trains and ferries.” – from today’s SMH.

The author (Alvin Singh) is currently working for News Digital, so RailCorp probably can’t contract him out for a few months or offer him a monetary payment for the app (which he has offered to RailCorp for free). How about accepting his offer of the code and giving him a yearly train pass…? Or letting him add in the bus, travel planner and service interruption stuff he’s said he wants to do, and giving him a yearly TravelPass?

Join in the new game that’s sweeping the country. It’s called “Bureaucracy”. Everybody stands in a circle. The first person to do anything loses.

27 February 2009

Web censorship scuttled?

Filed under: Uncategorized — Sonia @ 08:28

Happy news from today’s Sydney Morning Herald:

The Government’s plan to introduce mandatory internet censorship has effectively been scuttled, following an independent senator’s (Nick Xenophon) decision to join the Greens and Opposition in blocking any legislation required to get the scheme started….

3 December 2008

Disk MTBF – Mean Time Between Failures

Filed under: Uncategorized — Sonia @ 14:53

A good article on disk MTBF (Mean Time Between Failures), that clarified my understanding (thanks Jarek).

The key paragraph:

“To be interpreted properly, the MTBF figure is intended to be used in conjunction with the useful service life of the drive, the typical amount of time before the drive enters the period where failures due to component wear-out increase. MTBF only applies to the aggregate analysis of large numbers of drives; it says nothing about a particular unit. If the MTBF of a model is 500,000 hours and the service life is five years, this means that a drive of that type is supposed to last for five years, and that of a large group of drives operating within this timeframe, on average they will accumulate 500,000 of total run time (amongst all the drives) before the first failure of any drive. Or, you can think of it this way: if you used one of these drives and replaced it every five years with another identical one, in theory it should last 57 years before failing, on average (though I somehow doubt we’ll be using 10 to 100 GB spinning-platter hard disk drives in the year 2057. :^) )”

The link on service life explains:

“The service life of a modern hard disk is usually about three to five years. … Interestingly, the claimed service life is often longer than the warranty period for the drive. For example, the service life might be five years but the warranty period only three years. Think about what this means. ;^) Basically, it says that the manufacturer thinks the drive should last five years, but they aren’t going to bet on it lasting more than three! I personally think the warranty period is a better indication of a drive’s true useful life–to a point–because the warranty period is where the manufacturer “puts their money where their mouth is”.

11 January 2008

how to recognise a good programmer (and system adminstrator)

Filed under: Uncategorized — Sonia @ 14:55

KDan (via Slashdot) has a great post on how to recognise a good programmer; I think many of his points also apply to system administrators.

Some of the key points:

  • passionate about technology, will talk your ear off on a technical subject if encouraged; technology isn’t a day job but a lifestyle
  • learns new technologies on their own, and doesn’t say “send me on a course to learn that”
  • very uncomfortable about the idea of working with a technology they don’t believe to be “right”
  • has some hidden “icebergs”, large personal projects under the CV radar

All-in-all a really great article – I suggest you read it.

10 October 2007

The Life of American Vagabonds

Filed under: Uncategorized — Sonia @ 07:14

Some cool photos of American Vagabonds here. Here’s a sample photo:

vagabond_photo_1

Older Posts »

Blog at WordPress.com.