{
"name": "John Doe",
"layouts":
{ "layout-abc": {
"name": "Layout ABC", "active": true }
},
{ "layout-efg": {
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
var tabCount = 0; | |
function myFocusFunction() { | |
tabCount++; | |
console.log("tab #:", tabCount); | |
} | |
var x = document.getElementsByTagName('body'); | |
x[0].addEventListener("focus", myFocusFunction, true); |
I hereby claim:
- I am johnschimmel on github.
- I am base2john (https://keybase.io/base2john) on keybase.
- I have a public key whose fingerprint is 3C39 B6B4 9AA2 A91C 883D 2C23 9139 1BB2 3AD2 67D3
To claim this, I am signing this object:
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
@base: #109026; | |
#header .top-header .header-logo:hover { | |
color: @base; | |
} | |
#header .top-header .header-navigation ul li.menu-item-has-children .sub-menu li a:hover { | |
color: @base; | |
} |
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
exports.new_photo = function(req, res){ | |
// Get File upload information | |
var filename = req.files.image.filename; // actual filename of file | |
var path = req.files.image.path; //will be put into a temp directory | |
var mimeType = req.files.image.type; // image/jpeg or actual mime type | |
// Create a new blog post | |
var photoPost = new Photo(); // create Blog object |
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 mongoengine import * | |
from flask.ext.mongoengine.wtf import model_form | |
from datetime import datetime | |
class Comment(EmbeddedDocument): | |
name = StringField() | |
comment = StringField() | |
timestamp = DateTimeField(default=datetime.now()) |
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
<form method="POST" role="form"> | |
{{ form.csrf_token }} | |
<legend><h3>Share Your Ideas</h3></legend> | |
{% if form.errors %} | |
<ul class="errors"> | |
{% for field_name, field_errors in form.errors|dictsort if field_errors %} | |
{% for error in field_errors %} | |
<li>{{ form[field_name].label }}: {{ error }}</li> |
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
<div id="dynamicContent"></div> | |
<hr> | |
<button id="mrButton">Click me</button> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script> | |
jQuery('#mrButton').click(function(e){ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link rel="shortcut icon" href="../../docs-assets/ico/favicon.png"> |
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 -*- | |
import os, datetime, re | |
from flask import Flask, request, render_template, redirect, abort | |
from werkzeug import secure_filename | |
# import all of mongoengine | |
from flask.ext.mongoengine import mongoengine | |
# import data models | |
import models |