This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"folders": | |
[ | |
{ | |
"path": "site", | |
"folder_exclude_patterns": [ | |
"node_modules", | |
".sass-cache", | |
".tmp", | |
"dist" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export EDITOR='nano' | |
export PATH="/Applications/Postgres.app/Contents/Versions/9.4/bin:/usr/local/bin:/usr/local/sbin:/usr/local/share/python:$PATH" | |
export HISTSIZE=10000 | |
export HISTFILESIZE=10000 | |
#export PROMPT_COMMAND='echo -ne "\033]0;`hostname -s`\007"' | |
export LSCOLORS=gxfxcxdxbxegedabagacad | |
export PIP_DOWNLOAD_CACHE=$HOME/Library/Caches/pip-downloads | |
alias ls='ls -aGp' | |
alias ll='ls -la' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script> | |
// FUNCTION | |
function group(data, groupby) { | |
var grouped = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from django.forms.forms import NON_FIELD_ERRORS | |
class AddErrorMixin(object): | |
"Backport add_error() for django <1.7" | |
def add_error(self, field, msg): | |
field = field or NON_FIELD_ERRORS | |
if field in self._errors: | |
self._errors[field].append(msg) | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from django.db import models | |
def split_duration(value): | |
if value: | |
return ( '%02d' % (value // 3600), | |
'%02d' % ((value % 3600) // 60), | |
'%02d' % (value % 60), | |
) | |
return ('00', '00', '00') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Ever had a mysqldump of utf8 data stored in latin1 tables, dumped in utf8 and | |
munged with windows cp1252? | |
If so this is your friend. Just pipe it through this little baby and spare | |
yourself hours of unicode hell- it'll take your dirt and spit out clean utf8. | |
You can also import it and use it in your python code. |