This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tail(filename, n=10): | |
'Return the last n lines of a file' | |
return deque(open(filename), n) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 +++- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |