Skip to content

Instantly share code, notes, and snippets.

;; Load Path
(add-to-list 'load-path "~/.emacs.d/")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/")
;; Change directory for auto-save files
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
If you look at a list of US cities sorted by population, the number of successful startups per capita varies by orders of magnitude. Somehow it's as if most places were sprayed with startupicide.
I wondered about this for years. I could see the average town was like a roach motel for startup ambitions: smart, ambitious people went in, but no startups came out. But I was never able to figure out exactly what happened inside the motel—exactly what was killing all the potential startups.
A couple weeks ago I finally figured it out. I was framing the question wrong. The problem is not that most towns kill startups. It's that death is the default for startups, and most towns don't save them. Instead of thinking of most places as being sprayed with startupicide, it's more accurate to think of startups as all being poisoned, and a few places being sprayed with the antidote.
Startups in other places are just doing what startups naturally do: fail. The real question is, what's saving startups in places like Silicon
@gsathya
gsathya / tail.py
Created January 16, 2012 17:49 — forked from shadeslayer/tail.py
import sys
import linecache
import os
if os.path.isfile(sys.argv[1]):
try:
with open(sys.argv[1], 'r') as f:
content = f.readlines()
length = len(content)
except IOError as e:
@gsathya
gsathya / tail.py
Created January 18, 2012 15:32
Similar to tail
def tail(filename, n=10):
'Return the last n lines of a file'
return deque(open(filename), n)
@gsathya
gsathya / k2.py
Created January 23, 2012 09:48 — forked from j605/k2.py
simple coding question
def change_base(n, b):
rem = ''
while n > 0:
rem += str((n % b))
n /= b
return rem[::-1]
def pal_base(n):
base = 2
while 1:
From 3abd7fff210f2382f493517dc52aa2843277a230 Mon Sep 17 00:00:00 2001
From: Sathyanarayanan Gunasekaran <[email protected]>
Date: Fri, 23 Mar 2012 23:29:18 +0530
Subject: [PATCH] Add name_nice and name_nice_plural
All DB tables now have a "nice name" CRUD string setting to
simplify the construction of headers and other text elements.
This CRUD string supports both singular and plurals.
---
models/00_tables.py | 4 +++-
From b92e68277fb207d9aad2482718235ee355d7a3ba Mon Sep 17 00:00:00 2001
From: Sathyanarayanan Gunasekaran <[email protected]>
Date: Sat, 24 Mar 2012 09:04:41 +0530
Subject: [PATCH] Add tag table
Add a tag table with link table to project_task table
---
modules/eden/msg.py | 43 +++++++++++++++++++++++++++----------------
1 files changed, 27 insertions(+), 16 deletions(-)
From e0a670f99818ceda88c29a35aa9aee361b3dc8a0 Mon Sep 17 00:00:00 2001
From: Sathyanarayanan Gunasekaran <[email protected]>
Date: Sat, 24 Mar 2012 11:20:04 +0530
Subject: [PATCH] Add keywords to tasks
Support associating keywords (text strings) with tasks
---
modules/eden/cms.py | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
From 899259984355efc37fbd4f322267c7b13167866b Mon Sep 17 00:00:00 2001
From: Sathyanarayanan Gunasekaran <[email protected]>
Date: Sat, 24 Mar 2012 11:44:45 +0530
Subject: [PATCH 2/2] Fix message_id() and add foreign key
---
modules/eden/cms.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/eden/cms.py b/modules/eden/cms.py
From 899259984355efc37fbd4f322267c7b13167866b Mon Sep 17 00:00:00 2001
From: Sathyanarayanan Gunasekaran <[email protected]>
Date: Sat, 24 Mar 2012 11:44:45 +0530
Subject: [PATCH 2/2] Fix message_id() and add foreign key
---
modules/eden/cms.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/eden/cms.py b/modules/eden/cms.py