Skip to content

Instantly share code, notes, and snippets.

View ronbeltran's full-sized avatar

Ronnie Beltran ronbeltran

View GitHub Profile

This is a post by Joel Spolsky. The original post is linked at the bottom.

This is such a common question here and elsewhere that I will attempt to write the world's most canonical answer to this question. Hopefully in the future when someone on answers.onstartups asks how to split up the ownership of their new company, you can simply point to this answer.

The most important principle: Fairness, and the perception of fairness, is much more valuable than owning a large stake. Almost everything that can go wrong in a startup will go wrong, and one of the biggest things that can go wrong is huge, angry, shouting matches between the founders as to who worked harder, who owns more, whose idea was it anyway, etc. That is why I would always rather split a new company 50-50 with a friend than insist on owning 60% because "it was my idea," or because "I was more experienced" or anything else. Why? Because if I split the company 60-40, the company is going to fail when we argue ourselves to death. And if you ju

Apache:
- Activated 'KeepAlive' connections
- Lowered keep alive timeout from 15 seconds to 2 seconds
- Increased the number of minimum workers from 8 to 16
- Activated server status page (/server-status)
APC (Alternative PHP Cache):
- Set cache size to 256MB (ideal for SugarCRM workload)
Memcache:
@ronbeltran
ronbeltran / foo.log
Last active August 29, 2015 14:20 — forked from ibeex/foo.log
A warning occurred (42 apples)
An error occurred
"""
The activation key for the ``UserProfile`` will be a
SHA1 hash, generated from a combination of the ``User``'s
email and a random salt.
"""
salt = hashlib.sha1(str(random.random())).hexdigest()[:5]
email = user.email
if isinstance(email, unicode):
{% extends 'base.html' %}
{% import 'macros.html' as macros %}
{% block content %}
<div class="row">
<div class="col-xs-12 col-md-3 col-sm-4 col-sm-offset-4 col-md-offset-4 col-lg-3 col-lg-offset-4">
<div class="login-message">
Login to AwesomeService!
</div>
{% call macros.render_form(form, action_url=url_for('login_view'), action_text='Login',
class_='login-form') %}
{% capture html %}
<ul>
{% if include.context == "/" %}
<li class="{% if page.url == "/" %}active{% endif %}">
<a href="{{ site.baseurl }}/">{{ site.title }}</a>
</li>
{% endif %}
{% assign entries = site.pages | sort: "path" %}
{% for entry in entries %}

Interactive Debugging in any Python Web Project

Ron DuPlain - PyOhio 2013

Turn this:

### My alias
alias cls='clear'
alias v='vim'
alias such='curl -I'
alias r='dev_appserver.py .'
alias serve='python -m SimpleHTTPServer 8888'
alias fab_stage='fab no_upload no_package no_hipchat stage'
alias up='echo pwd | appcfg.py [email protected] --passin --no_cookies update'
alias down='echo pwd | appcfg.py [email protected] --passin --no_cookies rollback'
from django.db import models
from django.forms import ModelForm
from django import forms
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from accounts.models import UserProfile
class UserProfileForm(ModelForm):
def __init__(self, *args, **kwargs):