Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
from django.views.generic import View | |
from django.utils import simplejson | |
class JSONResponseView(View): | |
def render_to_response(self, data, **httpresponse_kwargs): | |
"Retuns a json response based on the context" | |
json_data = simplejson.dumps(data) | |
return HttpResponse(json_data, content_type="application/json", **httpresponse_kwargs) |
from django import forms | |
from django.test import RequestFactory | |
class RangeForm(forms.Form): | |
min = forms.IntegerField() | |
max = forms.IntegerField() | |
valor = forms.IntegerField() | |
def clean(self): |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Recentemente eu comentei sobre a migração que fizemos no [Myfinance][mf] saindo do [Heroku][h] e indo para a [Amazon Web Services][a] e diversas pessoas me perguntaram as razões pela qual fizemos essa mudança. O objetivo desse post é apenas explicar a decisão que a nossa equipe tomou, como foi e as conseguências dessa migração.
Antes de começar eu gostaria de deixar claro que o objetivo desse texto não é comparar hospedagens e nem dizer que uma é melhor do que a outra. Trata-se apenas do relato de uma experiência.
Antes de explicar a motivação por trás da migração é interessante mostrar como era a nossa estrutura.
As configured in my dotfiles.
start new:
tmux
start new with session name:
# Download | |
wget http://effbot.org/media/downloads/PIL-1.1.7.tar.gz | |
tar zxf PIL-1.1.7.tar.gz | |
cd PIL-1.1.7 | |
# Edit setup file | |
vim setup.py | |
# Set the following variables | |
JPEG_ROOT = '/usr/lib64','/usr/include' | |
ZLIB_ROOT = '/lib64','/usr/include' |
" Name: focus.vim | |
" Author: Alan MacDougall <[email protected]> | |
" License: Public Domain | |
" | |
" Focus on a single column of text, showing it in a distraction-free format. | |
" Save this as ~/.vim/scripts/focus.vim (or whatever you please), and invoke | |
" it with :source <filename>. Of course, you could certainly hook that up to a | |
" :command, or a macro, or a Vimscript function... | |
" collapse current splits and divide screen in three |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.projectboard</groupId> | |
<artifactId>projectboard</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<name>Project Board</name> | |
<description>Project management dashboard.</description> |
{# via http://www.caktusgroup.com/blog/2012/03/05/using-less-django/ #} | |
{% load compress %} | |
{% if debug %} | |
// This is the client-side way to compile less and an ok choice for local dev | |
<link rel="stylesheet/less" type="text/css" media="all" href="{{ STATIC_URL }}less/style.less" /> | |
<script src="{{ STATIC_URL }}js/less-1.1.3.min.js"></script> | |
{% else %} | |
{% compress css %} |
body#-webkit-web-inspector #main{background-color:#002b36!important}body#-webkit-web-inspector #main .panel.network,body#-webkit-web-inspector #main .panel.timeline,body#-webkit-web-inspector #main .panel.profiles,body#-webkit-web-inspector #main .panel.audits,body#-webkit-web-inspector #main .panel.extension{background-color:#fff!important}body#-webkit-web-inspector #console-messages a:hover,body#-webkit-web-inspector #console-messages .console-formatted-function,body#-webkit-web-inspector #console-messages .console-formatted-object{color:#93a1a1!important}body#-webkit-web-inspector #console-prompt,body#-webkit-web-inspector #console-messages a,body#-webkit-web-inspector #console-messages .console-message,body#-webkit-web-inspector #console-messages .console-group-messages .section .header .title{color:#839496!important}body#-webkit-web-inspector #console-messages .console-formatted-null,body#-webkit-web-inspector #console-messages .console-formatted-undefined{color:#657b83!important}body#-webkit-web-inspect |