Skip to content

Instantly share code, notes, and snippets.

View UBarney's full-sized avatar

UBarney

  • beijing
  • 11:40 (UTC +08:00)
View GitHub Profile
@UBarney
UBarney / ubuntu_update_package.sh
Created July 6, 2017 02:34
ubuntu_update_package
sudo apt-get update # Fetches the list of available updates
sudo apt-get upgrade # Strictly upgrades the current packages
sudo apt-get dist-upgrade # Installs updates (new ones)
@UBarney
UBarney / Flask - Logging Requests
Created June 28, 2017 06:14 — forked from ivanleoncz/flask_app_logging.py
Logging every request received from Flask.
#/usr/bin/python
import logging
from logging.handlers import RotatingFileHandler
from flask import Flask, request, jsonify
from time import strftime
import traceback
app = Flask(__name__)