Skip to content

Instantly share code, notes, and snippets.

@alokmishra
alokmishra / gist:835276
Created February 19, 2011 19:03 — forked from anonymous/gist:156623
deploy with gunicorn django fabric git
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@skinofstars
skinofstars / hosts
Last active June 2, 2020 08:16
Ansible static site deploy
[live]
live ansible_ssh_host=12.34.56.78 ansible_ssh_user=ubuntu
@ericbmerritt
ericbmerritt / git-semver.sh
Created July 30, 2014 21:04
Shell script for parsing semvers from git-describe
#! /bin/bash
# Assumes that you tag versions with the version number (e.g., "1.1")
# and then the build number is that plus the number of commits since
# the tag (e.g., "1.1.17")
DESCRIBE=`git describe --tags --always`
# increment the build number (ie 115 to 116)
VERSION=`echo $DESCRIBE | awk '{split($0,a,"-"); print a[1]}'`
@Checksum
Checksum / markdown.py
Last active August 29, 2015 14:07
Custom Markdown extension in Python
import re
import markdown2
class CustomMarkdown(markdown2.Markdown):
"""
Custom markdown processor that we use for task list
"""
reTaskList = re.compile('''
(?P<prefix>[\r\n|\n|\r]*)
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}