nodejs as a package on the debian family

NodeJS recently updated their install instructions for Debian, Ubuntu and Mint.
Finally, instead of compiling from source, the most recent nodejs/npm packages are available through an official repository.

See https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager for details, but basically its as easy as:
curl -sL https://deb.nodesource.com/setup | sudo bash -
apt-get install nodejs

or as a one-liner:
curl -sL https://deb.nodesource.com/setup | sudo bash -;apt-get install -y nodejs

Finally!

Bobby Fischer

Bobby Fischer was an American chess Grand Master.
He invented “Chess 960” where the game “employs the same board and pieces as standard chess; however, the starting position of the pieces on the players’ home ranks is randomized.”
960 apparently is the number of different starting positions one can have.
Cool dude.
(Inspiration: http://xkcd.com/1392/large/ )

svbtle wordpress theme

Finally. My favorite blog community’s look is available as a WordPress theme: https://github.com/gravityonmars/wp-svbtle
I’m using it as is, cause thats how lazy I am.
I think this theme has the potential to be the new default.

ubuntu 11.10 alt-tab crashes desktop, restart mandatory to fix

Hello there dear peeps,

If you’re having the above-summarized problem, at your login screen (where you type your password), click the little cogs and choose ‘Ubuntu 2D’ from that list.

Fancy window-switching looses all of its visual appeal, but at least you don’t have to restart 10 times a day because, omg, you pressed ALT+TAB.

Linux would be loved by mainstream PC customers if it could only get rid of its tough-love attitude towards daily users; and I want it so bad to be so.
I’d be a bit more accepting if ALT+TAB was anything but default behavior – on any graphical desktop platform.

Well, honestly, I don’t remember if Win 3.11 had ALT+TAB…

Update: through the guts of the non-Apache stack

The Business
It’s been some time since I wrote here; we’ve had a few setbacks with our chosen name. We were told we’d be facing some trademark litigation if we went forward with it, so dropping that premium domain name, finding the courage to spend money on another premium domain name again was a fairly taxing ordeal.

Now we have a name that’s been cleared of any obvious patent/trademark litigation issues, we’re waiting on the actual domain transfer to our registrar.

New Gadgets
Some new things I’m using this month are Trello from FogCreek, a simple (*agile*, but I don’t use it for that purpose) list-making/organising board. I highly recommend it. The stack behind it is also very contemporary; compared to FogCreek’s other software, Trello is on the cutting edge. LESS for CSS, CoffeeScript for their JS along with backbone.js. You can read more on that at fogcreek: http://blog.fogcreek.com/the-trello-tech-stack/

Amazon Web Services RDS (Relational Database Service) – so here what Amazon does is take care of the install, maintenance, regular backup/snapshot, and master-slave configuration for your database over multiple availability zones and give you a single price to pay, a single endpoint to connect to, advanced and flexible security, and lots of metrics to follow the performance of your DB.

I’m extremely pleased with RDS for now. I understand there can be some write latency due to the concurrent/consistent-write nature of their master/slave setup. But off the bat I know my DBs are safe, at least against the most common failures. Some write latency for that peace-of-mind is a worthy tradeoff.

nginx: best thing since slices of virtual machines
nginx: this one I’ve taken up very recently, but I’m extremely pleased with its low-overhead nature. Having to struggle with apache’s memory demands, in todays RAM-based-pricing market was a constant occupation.

When switching over to nginx its not just about replacing Apache but replacing mod_php as well. Running PHP as an external daemon has been a new experience, and not without some segfault madness. But its also refreshing to have it as an external resource, completely separate yet supported by nginx’s internals. Some of the problems I had to troubleshoot have been very unpopular, I’ve been frustrated with Google a couple of times for making me go in circles, giving too much weight to a single keyword. Sometimes I wished Google would just say ‘Hey buddy, I got nothing for you on this one.’ rather than making me have to go through pages of irrelevant content.

Outdated Xeon CPUs are recipe for underperforming nginx setups
During our trial and error phase we learned a couple of things. The most shocking was this: AWS will give you old generation Xeon CPUs on their low/mid-end instances. Always check ‘cat /proc/cpuinfo’ to see what generation Xeon you’re using. Apparently the instruction set has seriously been expanded and improved upon, and furthermore modern CPU-focused software like nginx are highly capable of utilizing on those new instruction sets so you’re losing a lot of performance between even a single generation of CPUs.

BTW, Linode’s cheapest VPS has an L55xx Xeon, as always – kudos Linode!
I’ve had to open a few tickets recently, and I didn’t even know this but Linode’s support is stellar people. 10 out of 10, easily. Average response time has been 5-6 minutes and very professional.

allowing only 1 IP through

iptables -I INPUT \! --src 1.2.3.4 -m tcp -p tcp --dport 777 -j DROP # if it's not 1.2.3.4, drop it 

insert into chain INPUT drop any tcp packet to port 777 thats not from the ip 1.2.3.4

Source: ServerFault

something to read out loud for startups

Here’s a passage from a speech by Theodore Roosevelt that gives me strength during the startup roller-coasters; the joyful excitement and the crushing disappointments. Please humor me and read it out loud:

It is not the critic who counts;
not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better.
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood;
who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming;
but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause;
who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor defeat.

The quote is from a speech he gave on April 23, 1910 in Paris.
You can download the whole speech ~18 pages long.