As configured in my dotfiles.
start new:
tmux
start new with session name:
| # From http://fahdshariff.blogspot.ca/2011/04/highlighting-command-output-with.html 加以修改 | |
| # 1. sudo apt install grc | |
| # 2. 將本設定檔存到 ~/.grc/conf.tail (要自建.grc資料夾) | |
| # 3. grc -c conf.tail tail -f webapp/website.log | |
| # this configuration file is suitable for displaying log files | |
| #errors | |
| regexp=^.*(ERROR|Error|Exception).*$ | |
| colours=bold red | |
| ====== |
| # [🟨OPTIONAL] Uninstall old docker versions | |
| sudo apt-get remove docker docker-engine docker.io containerd runc | |
| # Refresh latest version | |
| sudo apt-get update | |
| # Install pre-req | |
| sudo apt-get install -y \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg \ |
| # 從__init__.py載入變數的方法 | |
| from .__init__ import celery |
| {"lastUpload":"2019-11-16T03:20:23.561Z","extensionVersion":"v3.4.3"} |
| ## 匯出資料 | |
| mysqldump -u <account> -p <db_name> > <sql_file_name> | |
| ## 匯入資料 | |
| mysql -u <account> -p <db_name> < <sql_file_name> |
| # jinja2 | |
| ## 資料轉換 | |
| {% set weeks = { '1' : '星期一', '2' : '星期二', '3': '星期三', '4': '星期四', '5': '星期五', '6': '星期六' } %} | |
| <div class="col-md-3 col-sx-6"> | |
| <h2 class="text-primary">{{ weeks[course_post.week] }}</h2> | |
| </div> | |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| # Configuration file for ipython. | |
| #------------------------------------------------------------------------------ | |
| # InteractiveShellApp(Configurable) configuration | |
| #------------------------------------------------------------------------------ | |
| ## A Mixin for applications that start InteractiveShell instances. | |
| # | |
| # Provides configurables for loading extensions and executing files as part of | |
| # configuring a Shell environment. |
| <script> | |
| var app = new Vue({ | |
| el: '#app', | |
| data: { | |
| message1: | |
| }, | |
| delimiters: ["${","}$"] | |
| }) | |
| </script> |
| # Example of combining Flask-Security and Flask-Admin. | |
| # by Steve Saporta | |
| # April 15, 2014 | |
| # | |
| # Uses Flask-Security to control access to the application, with "admin" and "end-user" roles. | |
| # Uses Flask-Admin to provide an admin UI for the lists of users and roles. | |
| # SQLAlchemy ORM, Flask-Mail and WTForms are used in supporting roles, as well. | |
| from flask import Flask, render_template | |
| from flask.ext.sqlalchemy import SQLAlchemy |