Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
from django.contrib.sessions.backends.base import SessionBase, CreateError | |
from django.conf import settings | |
from django.utils.encoding import force_unicode | |
import redis | |
class SessionStore(SessionBase): | |
""" Redis store for sessions""" | |
def __init__(self, session_key=None): | |
self.redis = redis.Redis( |
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
from celery.schedules import crontab | |
from flask.ext.celery import Celery | |
CELERYBEAT_SCHEDULE = { | |
# executes every night at 4:15 | |
'every-night': { | |
'task': 'user.checkaccounts', | |
'schedule': crontab(hour=4, minute=20) | |
} | |
} |
########## | |
# Win10 Initial Setup Script | |
# Author: Disassembler <[email protected]> | |
# Version: 1.7, 2016-08-15 | |
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/ | |
# THIS IS A PERSONALIZED VERSION | |
# This script leaves more MS defaults on, including MS security features. | |
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1 |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.
The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.
When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].
When working with a centralized workflow the concepts are simple, master
represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message
or github-oauth
for your branches.
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control
and E-Tag
headers, etc.), minification, etc.