Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| Get query strings | |
| name = self.request.get('name', 'Anonymous') | |
| members = self.request.get_all('members') |
| $CS2 = mysql_query("SELECT VID, AN FROM Cl WHERE VID = '$VID' "); | |
| while( $row = mysql_fetch_array($CS2) ) { | |
| $AN1 = $row['AN']; | |
| $VID = $row['VID']; | |
| $BA = 0; | |
| $PA = 0; | |
| $TB = 0; | |
| $Ba = 0; |
| To update appengine project on system with multiple accounts: | |
| appcfg.py --no_cookies update <appname> | |
| #For Postgres | |
| initdb /usr/local/var/postgres -E utf8 # create a database cluster | |
| postgres -D /usr/local/var/postgres # serve that database | |
| PGDATA=/usr/local/var/postgres postgres # …alternatively | |
| If builds of PostgreSQL 9 are failing and you have version 8.x installed, | |
| you may need to remove the previous version first. See: |
| (android) | |
| (areyoukiddingme) | |
| (arrington) | |
| (awyeah) | |
| (basket) | |
| (beer) | |
| (bunny) | |
| (bumble) | |
| (cadbury) | |
| (cake) |
| # -*- coding: utf-8 -*- | |
| """ | |
| A real simple app for using webapp2 with auth and session. | |
| It just covers the basics. Creating a user, login, logout and a decorator for protecting certain handlers. | |
| PRE-REQUIREMENTS: | |
| Set at secret_key in webapp2 config: |
| <div id="fb-root"></div> | |
| <script> | |
| window.fbAsyncInit = function() { | |
| // init the FB JS SDK | |
| FB.init({ | |
| appId : 'YOUR_APP_ID', // App ID from the app dashboard | |
| status : true, // Check Facebook Login status | |
| xfbml : true // Look for social plugins on the page | |
| }); |
| ; Comments start with semicolons. | |
| ; Clojure is written in "forms", which are just | |
| ; lists of things inside parentheses, separated by whitespace. | |
| ; | |
| ; The clojure reader assumes that the first thing is a | |
| ; function or macro to call, and the rest are arguments. | |
| ; | |
| ; Here's a function that sets the current namespace: | |
| (ns test) |
| from django.db import models | |
| from django.forms import ModelForm | |
| from django import forms | |
| from django.contrib.auth.models import User | |
| from django.utils.translation import ugettext_lazy as _ | |
| from accounts.models import UserProfile | |
| class UserProfileForm(ModelForm): | |
| def __init__(self, *args, **kwargs): |