Wednesday, August 28, 2013

scalability

Saving these for myself to reference tomorrow at work (too lazy to sign into our chat server)
http://highscalability.com/blog/2013/8/26/reddit-lessons-learned-from-mistakes-made-scaling-to-1-billi.html

Work already knows about this one but I've still failed to read it, so I'll put it here to shame myself further into actually reading it.
http://techcrunch.com/2013/07/11/how-did-dropbox-scale-to-175m-users-a-former-engineer-details-the-early-days/


It's so hard to think about scale at the moment; I'm still trying to get some of the hard stuff right for just one thing.
Thinking about it in terms of a billion things is boggling. I know it's coming but I need to get the one case right.
Then figure out how to do it a billion times, and fast.

My scale might be off, I might have to do it for a gajillion things.

Friday, March 29, 2013

Changing the background for the Lockscreen in Ubuntu 12.10

It seems like every time I want to tweak something in Ubuntu these days, it's a vicious workaround involving multiple hoops.

So here's another, for the default lockscreen on Ubuntu.

According to AskUbuntu and other sources all over the internet, you can't change the background of the lock screen.

This is mostly true; you could recompile gnome-screensaver I suppose (there's links out there to do it) but the simplest way to do it is this:

First get the PNG you want to use. It has to be PNG because this is an awful "hack" to make it work.

From a terminal window:
sudo mv /usr/share/backgrounds/warty-final-ubuntu.png /usr/share/backgrounds/warty-final-ubuntu.orig.png
sudo mv /path/to/your/file.png /usr/share/backgrounds/warty-final-ubuntu.png

And you're done.

Tuesday, January 22, 2013

VIM as an IDE? Bah.

Linux is the IDE.
Vim's just a ridiculous powertool inside of it.

Today I embarrassed myself by telling a windows guy "this is a powerful example of what linux is", and tried fgrepping into vim, forgetting the -l switch.

So I was running:
Moron> fgrep -r TODO | xargs vi

Which was opening up hundreds of files all at once, named fix, this, by, subclassing etc

Took a while. Guy thinks I'm a moron.

Wednesday, January 9, 2013

python dictionary interpolation - wow

I never knew this worked:

>>> fruits = { 'apple' : 1, 'orange':3, 'banana':4 }
>>> print 'I have %(apple)s apple, %(orange)s oranges, and %(banana)s bananas' % fruits
I have 1 apple, 3 oranges, and 4 bananas

Python will take your dictionary and allow you to interpolate it in a string formatting. This leads to some really nice readability.