makes views for models based off baseModel. useful when using http://github.com/jwietelmann/express3_boilerplate
if you have
- models/department.js
- routes/ui/departments.js
- routes/api/departments.js
- views/departments/index.jade
and
- models/area.js
.rounded{ | |
-moz-border-radius: 5px; | |
-webkit-border-radius: 5px; | |
-khtml-border-radius: 5px; | |
} |
# With this setup, your OAuth URLs will be: | |
Request Token URL: /oauth/request_token/ | |
User Authorization URL: /oauth/authorize/, using HTTP GET. | |
Access Token URL: /oauth/access_token/ |
jQuery.event.add(window, 'resize', resize); | |
jQuery.event.add(window, 'load', init); |
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title":"boo","description":"hahaha"}' -X POST http://localhost:8080/api/lesson |
""" Vundle """"""""""""""""""""""""""""""""""""""""""""" | |
" | |
" Brief help | |
" :BundleList - list configured bundles | |
" :BundleInstall(!) - install(update) bundles | |
" :BundleSearch(!) foo - search(or refresh cache first) for foo | |
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" NOTE: comments after Bundle command are not allowed.. |
# Setting PATH for Python 2.7 | |
# The orginal version is saved in .bash_profile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" | |
export PATH | |
#test -r /sw/bin/init.sh && . /sw/bin/init.sh | |
export PATH=/usr/local/mysql/bin:$PATH | |
export PATH=/Library/PostgreSQL/9.1/bin:$PATH | |
PYTHONPATH="/usr/local/lib":$PYTHONPATH | |
export PYTHONPATH |
makes views for models based off baseModel. useful when using http://github.com/jwietelmann/express3_boilerplate
if you have
and
MEDIA_ROOT = '/Users/hcwiley/github/heartbucket/heartbucket.com/static' | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. | |
'NAME': 'heartbucket', # Or path to database file if using sqlite3. | |
'USER': 'django', # Not used with sqlite3. | |
'PASSWORD': '', # Not used with sqlite3. | |
'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. | |
'PORT': '', # Set to empty string for default. Not used with sqlite3. | |
} |
import sys | |
str = sys.argv[1] | |
i = 0 | |
out = "" | |
for c in str: | |
i += 1 | |
out += c | |
if i % 4 == 0: | |
out += "\n" |
import os, sys | |
models = ['foo', 'bar', 'fooBar'] | |
baseModel = 'baseModel' | |
os.chdir('routes/ui') | |
extension = ".js" | |
for model in models: | |
f = open("%ss%s" % (baseModel, extension )) | |
newLines = [] | |
for line in f.readlines(): | |
line = line.replace("%s" % baseModel, "%s" % model) |