Skip to content

Instantly share code, notes, and snippets.

View chrisdev's full-sized avatar

Christopher Clarke chrisdev

View GitHub Profile
@chrisdev
chrisdev / social-share-snippet.html
Created August 9, 2014 00:41
Social network share buttons
<section class="share">
<h4>Share this post</h4>
<div class="links">
<a class="icon-twitter-circled"
href="http://twitter.com/share?text={{title}}&url={{url absolute="true"}}"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<span class="hidden">Twitter</span>
</a>
<a class="icon-facebook-circled"
  • Update CHANGES.rst
  • Update version number in my_project/__init__.py
  • Update version number in setup.py
  • Install the package again for local development, but with the new version number:
python setup.py develop
  • Run the tests:
python setup.py test
@chrisdev
chrisdev / index.html
Last active August 29, 2015 14:03 — forked from anonymous/bGszx.markdown
Improving the UX of the submit button
UX improvement for Submitt Button
-----------------------------------
Forked from [Mark Hayes](http://codepen.io/mhayes)'s Pen [qdCAc](http://codepen.io/mhayes/pen/qdCAc/).
A [Pen](http://codepen.io/rafibomb/pen/bGszx) by [Rafi Benkual](http://codepen.io/rafibomb) on [CodePen](http://codepen.io/).
[License](http://codepen.io/rafibomb/pen/bGszx/license).
@chrisdev
chrisdev / .bash_profie
Last active August 29, 2015 13:57
A Simple OSX bash_profile
PS1='[\u@\h \W]\$ '
#better prompt for sudo
SUDO_PS1='[\u@\h \W]\$ '
export LANG="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_ALL=
## Colorize the ls output ##
alias cp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
from django.db import models
class M1(models.Model):
title = models.CharField(max_length=100)
img1 = models.ImageField(upload_to="static/")
def __unicode__(self):
return self.title
@chrisdev
chrisdev / django_project_notebook.py
Created November 20, 2012 16:57
IPython notebook extension for Django project
def setup_django_env(path):
import imp
import sys
from os.path import join
from django.core.management import setup_environ
f, filename, desc = imp.find_module('settings', [path])
project = imp.load_module('settings', f, filename, desc)
setup_environ(project)