Skip to content

Instantly share code, notes, and snippets.

View ibstelix's full-sized avatar

Ibrahima Gaye ibstelix

  • Dakar/Senegal
View GitHub Profile
@mtanco
mtanco / wave_started_app.py
Created March 19, 2021 17:52
Starter code I have been using for most new apps
from h2o_wave import main, app, Q, ui, handle_on, on, data
from loguru import logger
def on_startup():
"""
Runs when the app is started, even if there are no browsers connected
:return:
"""
logger.info('http://localhost:10101/')
# Custom history configuration
# Run script using:
# chmod u+x better_history.sh
# sudo su
# ./better_history.sh
echo ">>> Starting"
echo ">>> Loading configuration into /etc/bash.bashrc"
echo "HISTTIMEFORMAT='%F %T '" >> /etc/bash.bashrc
echo 'HISTFILESIZE=-1' >> /etc/bash.bashrc