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
reader: "filesystem" | |
writer: "filesystem" | |
plugins: ["markdown", "blank", "tags"] | |
deployment: "s3sub" | |
url_scheme: | |
index: "" | |
archive: "/archive/" | |
tag: "/tag/%slug/" | |
post: "/%year/%month/%slug/" | |
page: "/%slug/" |
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
# 100 posts - 5 images | |
Shirayuki ~/Projects/drupan venv | |
$ time python drupan.py ~/tmp/screamingatmyscreen/config.yaml --nodeploy | |
python drupan.py ~/tmp/screamingatmyscreen/config.yaml --nodeploy 0,77s user 0,06s system 99% cpu 0,835 total | |
# 200 posts - 10 images | |
Shirayuki ~/Projects/drupan venv | |
$ time python drupan.py ~/tmp/screamingatmyscreen/config.yaml --nodeploy | |
python drupan.py ~/tmp/screamingatmyscreen/config.yaml --nodeploy 0,95s user 0,08s system 97% cpu 1,033 total |
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
autoload -U colors && colors | |
autoload -U compinit && compinit | |
# completion | |
zstyle ':completion:*' menu select | |
setopt completealiases | |
# history | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=1000 |
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
set nocompatible | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
set history=100 | |
set incsearch | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab |
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
func filterEntities(s []*Entity, key string, val string) (res []*Entity) { | |
val = strings.ToLower(val) | |
for _, e := range s { | |
switch reflect.ValueOf(e).Elem().FieldByName(key).Kind() { | |
case reflect.Slice: | |
imm := reflect.ValueOf(e).Elem().FieldByName(key) | |
for i := 0; i < imm.Len(); i++ { | |
v := imm.Index(i).String() |
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
autoload -U colors && colors | |
autoload -U compinit && compinit | |
# completion | |
zstyle ':completion:*' menu select | |
setopt completealiases | |
# history | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=1000 |
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
set nocompatible | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
set history=100 | |
set incsearch | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set number |
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
if [ $UID -eq 0 ]; then LOGINCOLOR="red"; else LOGINCOLOR="blue"; fi | |
function virtualenv_info { | |
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' | |
} | |
PROMPT='%{${fg[blue]}%}[%{$reset_color%}%m%{${fg[blue]}%}]%{$reset_color%} %{${fg[magenta]}%}%B%3~%b %{$reset_color%}%{${fg[$LOGINCOLOR]}%}»%{$reset_color%} ' | |
RPROMPT='$(git_prompt_info)' |
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.shortcuts import render_to_response | |
from django.template import RequestContext | |
from tumblelog.models import Entry, Tag | |
def tag(request, pid): | |
ci = RequestContext(request) | |
tmpl = {} | |
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.db import models | |
from django.contrib.contenttypes import generic | |
from django.contrib.contenttypes.models import ContentType | |
from django.db.models.signals import post_save | |
class Tag(models.Model): | |
name = models.CharField(max_length=400, unique=True) | |