Skip to content

Instantly share code, notes, and snippets.

@ak64th
ak64th / app.py
Created December 25, 2015 09:40
Hello world for flask assets and underscore templates
from flask import Flask, render_template
from flask_assets import Bundle, Environment
app = Flask('app')
app.config['JST_COMPILER'] = u'_.template'
app.config['JST_NAMESPACE'] = 'window.Templates'
app.config['JST_BARE'] = False
env = Environment()
@henriquemenezes
henriquemenezes / postgresql-set-id-seq.sql
Created March 31, 2016 12:23
PostgreSQL set Next ID Sequence Value to MAX(id) from Table
-- Get Max ID from table
SELECT MAX(id) FROM table;
-- Get Next ID from table
SELECT nextval('table_id_seq');
-- Set Next ID Value to MAX ID
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));