Ron DuPlain - PyOhio 2013
This file contains hidden or 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
; 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) |
This file contains hidden or 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
<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 | |
}); |
This file contains hidden or 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
# -*- 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: |
This file contains hidden or 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
(android) | |
(areyoukiddingme) | |
(arrington) | |
(awyeah) | |
(basket) | |
(beer) | |
(bunny) | |
(bumble) | |
(cadbury) | |
(cake) |
This file contains hidden or 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
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: |
This file contains hidden or 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
$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; |
This file contains hidden or 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
Get query strings | |
name = self.request.get('name', 'Anonymous') | |
members = self.request.get_all('members') |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...