This file contains 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
import cgi | |
from google.appengine.api import mail | |
from google.appengine.ext import deferred | |
from ndb import model | |
from tipfy.routing import url_for | |
from tipfyext.ndb.mixins import DateMixin | |
This file contains 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 -*- | |
from __future__ import absolute_import | |
import datetime | |
from ndb import model | |
from webapp2_extends.utils import Unique, UniqueConstraintViolation, \ | |
check_password_hash, generate_password_hash | |
from webapp2_extends.auth import create_session_id | |
DEBUG = True |
This file contains 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
require 'sproutcore' | |
require 'sproutcore-statechart' | |
require 'sproutcore-routing' | |
App = SC.Application.create() | |
App.GlobalNavController = SC.Object.create( | |
home: -> App.statechart.gotoState 'home' | |
about: -> App.statechart.gotoState 'about' | |
) |
This file contains 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
import models | |
from wtforms import Form | |
from wtforms import fields | |
from wtforms import validators | |
class PasswordRestForm(Form): | |
email = fields.TextField('email') | |
class PasswordChangeForm(Form): | |
current = fields.PasswordField('Current Password') |
This file contains 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
upstream nodejs { | |
server 127.0.0.1:3000; | |
keepalive 8; | |
} | |
server { | |
listen 80; | |
listen [::]:80 ipv6only=on default_server; | |
server_name mydomain.fi; |
This file contains 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
# the IP(s) on which your node server is running. I chose port 4000. | |
upstream exampleprod { | |
ip_hash; | |
server 127.0.0.1:4000 max_fails=2 fail_timeout=10s; | |
# server 127.0.0.1:4001 max_fails=2 fail_timeout=10s; | |
keepalive 8; | |
} | |
# Redirect HTTP traffic to HTTPS | |
server { |