Skip to content

Instantly share code, notes, and snippets.

import json
from app import db, Artist, Album, Song
if __name__ == '__main__':
fixture_path = 'sample.json'
print "Dropping tables..."
db.drop_all()
@jpadilla
jpadilla / app.css
Created August 14, 2014 18:31
BFTW Soundem Web CSS
/* apply a natural box layout model to all elements */
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html, body {
height: 100%;
}
@jpadilla
jpadilla / app.js
Created August 15, 2014 21:21
Simple examples for Building for the Web: Day 2 - The Backend
'use strict';
var express = require('express');
var app = express();
app.get('/api/v1/songs', function(req, res) {
var data = {
songs: [{
id: 1,
album: 1,
favorite: false,
@jpadilla
jpadilla / gist:6dd7810697a49187a499
Last active August 29, 2015 14:05
Barrandiando endpoints