Skip to content

Instantly share code, notes, and snippets.

View doismellburning's full-sized avatar
🔥

Kristian Glass doismellburning

🔥
View GitHub Profile
@doismellburning
doismellburning / gist:4136093
Created November 23, 2012 15:17
git-flow help < git help
$ git flow help init
usage: git flow <subcommand>
Available subcommands are:
init Initialize a new git repo with support for the branching model.
feature Manage your feature branches.
release Manage your release branches.
hotfix Manage your hotfix branches.
support Manage your support branches.
version Shows version information.
def try_env(env_vars, default=None):
for env_var in env_vars:
result = os.getenv(env_var)
if result is not None:
return result
return default
REDISDB = redis.from_url(try_env(['REDIS_URL', 'REDISTOGO_URL', 'REDISGREEN_URL'], 'redis://localhost:6379'))
# Awfully shonky, or moderately reasonable?
@doismellburning
doismellburning / README.md
Created March 13, 2013 17:45
django-12factor

django-12factor

What is it?

Django is an awesome Python web framework.

"The Twelve-Factor App" is an awesome methodology for building SaaS apps.

django-12factor makes Django more 12factor-y. Right now, this focusses on the Config - "Store config in the environment"; Heroku users with addons will be particularly familiar with this.

@doismellburning
doismellburning / celeryconfig.py
Created April 26, 2013 17:43
Celery configuration lost when calling one task from another
from datetime import timedelta
BROKER_URL = "redis://192.168.2.10"
CELERY_IMPORTS = ("tasks", )
CELERY_WORKER_DIRECT = True
CELERYBEAT_SCHEDULE = {
"healthcheck": {
---
:hierarchy:
- local_dev
- secrets
- "overrides/%{::fqdn}"
- "location/%{::server_location}"
- "environment/%{::server_environment}"
- "role/%{::server_role}"
- common
:yaml:
Exec["apt_update"] -> Package <||>
hiera_include('classes')
class Bid(models.Model):
owner = models.ForeignKey(User)
amount = models.IntegerField()
price = model.IntegerField()
secret = model.BooleanField()
# So if I have:
#
# Bid(User1, 1, 1, False)
@doismellburning
doismellburning / apt_client.pp
Created July 16, 2013 14:08
Puppet Dependencies
class doismellburning::apt::client::stable (
) {
apt::source {
'doismellburning-stable':
# Stuff
}
}
class doismellburning::apt::client::testing (
) {

"Positive Discrimination"

(Axiom: "affirmative action" == "positive discrimination", the former being a USism, the latter a UKism)

"“Affirmative action” means positive steps taken to increase the representation of women and minorities in areas of employment, education, and business from which they have been historically excluded. When those steps involve preferential selection—selection on the basis of race, gender, or ethnicity—affirmative action generates intense controversy."

My issue is with "preferential selection".

@alexstapleton: @doismellburning @didlix Thus saying "I don't approve of +ve discrimination" is saying "I don't agree with increasing equality." [http://twitter.com/alexstapleton/status/363239400890564610]

If Person A steals a bike from Person B, then Person A is riding a bike to school, and Person B is walking. A is better off at the expense of B. That is clear-cut and most people’s view of theft. In Serge’s case, think of being at a company for three years and you carry a spiral notebook and write everything down. Everything about your meetings, your ideas, products, sales, client meetings—it’s all written down in that notebook. You leave for your new job and take the notebook with you (as most people do). The contents of your notebook relate to your history at the prior company, but have very little relevance to your new job. You may never look at it again. Maybe there are some ideas or templates or thoughts you can draw on. But that notebook is related to your prior job, and you will start a new notebook at your new job which will make the old one irrelevant. . . . For programmers their code is their spiral notebook. [It enables them] to remember what they worked on—but it has very little relevance to wha