Open terminal and type:
1. Create a directory at ~/bin:
mkdir ~/bin
2. Copy sublime executable to your ~/bin directory:
#coding: utf-8 | |
from django.test.simple import DjangoTestSuiteRunner | |
from nose.plugins.skip import SkipTest | |
from mongoengine.python_support import PY3 | |
from mongoengine import connect | |
try: | |
from django.test import TestCase | |
from django.conf import settings |
HomebrewでphpMyAdminを入れる方法
※OS Xの中のApacheとPHPを動かして、MySQLをHomebrewで入れてる前提
それがまだなら、まずは以下を
Apache+PHP+MySQL(Homebrew) on Mountain Lion https://gist.github.com/3806975
ALSO SEE THIS: http://eddychan.com/post/18484749431/minimum-viable-ops-deploying-your-first-django-app-to | |
AND THIS: http://bitnami.com/stack/django | |
These are my notes on how to quickly setup a python, virtualenv (use virtualenv-burrito FTW), and django. | |
Setup an EC-2 instance: | |
======================= | |
Use the quick launch wizard: |
import json | |
import urllib | |
import pymongo | |
con = pymongo.Connection('mongodb://localhost', | |
safe = True) | |
db = con.reddit | |
stories = db.stories | |
url = 'http://www.reddit.com/r/Python/.json' |
#!/usr/bin/env python | |
from urllib2 import urlopen, urlencode | |
from pymongo import connection | |
import json | |
from optparse import OptionParser | |
from time import sleep | |
verbose = 1 | |
parser = OptionParser() |
#!/bin/bash | |
NAME="hello_app" # Name of the application | |
DJANGODIR=/webapps/hello_django/hello # Django project directory | |
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket | |
USER=hello # the user to run as | |
GROUP=webapps # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use | |
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name |
A Trello board is a software equivalent of a physical wall with columns of sticky notes. In Trello terminology, the wall is called a "board." The columns are called "lists." The sticky notes in columns are called "cards."
No two products are the same, so flexibility in the product management process is important. Trello responds well to changing the structure of the process "on the fly."
#!/usr/bin/python | |
import argparse | |
from pymongo import MongoClient as Client | |
from bson import BSON | |
from bson import json_util | |
import json | |
import os | |
# mongo client |