Skip to content

Instantly share code, notes, and snippets.

View rlam3's full-sized avatar

rlam3

View GitHub Profile
@davebarkerxyz
davebarkerxyz / rebuild_search_indices.py
Last active May 19, 2020 07:43
Rebuild Flask-WhooshAlchemy search indices
#!/usr/bin/env python
import datetime
from app import app, models
import whoosh
import flask_whooshalchemy
"""
Rebuild all Whoosh search indices
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rduplain
rduplain / README.md
Created August 30, 2012 16:07
Flask-Script: demo passing in configuration file.

This demonstrates that you can configure a Flask application through Flask-Script, without having to create a Flask instance or deal with circular dependencies. Note that Flask-Script's Manager accepts a factory function in place of a Flask app object.

Running:

python manage.py runserver

gives "Hello, world!" on http://localhost:5000/, while running:

python manage.py runserver -c development.cfg
@ibeex
ibeex / foo.log
Created August 4, 2012 13:46
Flask logging example
A warning occurred (42 apples)
An error occurred
@d3vron
d3vron / mixins.styl
Created July 13, 2011 14:04
Easy-to-use CSS3 mixins for Stylus (includes linear-gradient)
vendor(prop, args)
-webkit-{prop} args
-moz-{prop} args
-ms-{prop} args
-o-{prop} args
{prop} args
border-radius()
vendor('border-radius', arguments)