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
#!/bin/bash | |
# Remind you to take a 10-min break every 50 min. | |
# It will send a notification and speak on OSX. On other platform, it just prints a message in the console.. | |
user=`whoami` | |
worktime=3000 | |
breaktime=570 | |
backtime=30 | |
function notify { | |
which osascript > /dev/null && osascript -e "display notification \"$1\" with title \"Mr. Tomato\" subtitle \"$2\"" |
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
from flask import Flask | |
from db import db | |
def create_app(config_obj) | |
app = Flask('tets') | |
app.config.fromobj(config_obj) # db configured in `config_obj` | |
db.init_app(app) |