Skip to content

Instantly share code, notes, and snippets.

@Checksum
Checksum / markdown.py
Last active Aug 29, 2015
Custom Markdown extension in Python
View markdown.py
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]*)
@alokmishra
alokmishra / gist:835276
Created Feb 19, 2011 — forked from anonymous/gist:156623
deploy with gunicorn django fabric git
View gist:835276
"""
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._
@skinofstars
skinofstars / hosts
Last active Jun 2, 2020
Ansible static site deploy
View hosts
[live]
live ansible_ssh_host=12.34.56.78 ansible_ssh_user=ubuntu
@ericbmerritt
ericbmerritt / git-semver.sh
Created Jul 30, 2014
Shell script for parsing semvers from git-describe
View git-semver.sh
#! /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]}'`
@datagrok
datagrok / gist:2199506
Last active Sep 8, 2021
Virtualenv's `bin/activate` is Doing It Wrong
View gist:2199506
@imjasonh
imjasonh / markdown.css
Last active Mar 11, 2022
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}