Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
When running FastAPI
app, all the logs in console are from Uvicorn
and they do not have timestamp and other useful information. As Uvicorn
applies python logging
module, we can override Uvicorn
logging formatter by applying a new logging configuration.
Meanwhile, it's able to unify the your endpoints logging with the Uvicorn
logging by configuring all of them in the config file log_conf.yaml
.
Before overriding:
uvicorn main:app --reload
Update: As of 11 January 2022, git.io no longer accepts new URLs.
Command:
curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"
URLs that can be created is from:
https://github.com/*
https://*.github.com
import todoist | |
from escpos import printer | |
therm = printer.Usb(0x0416, 0x5011) # connect to printer | |
api = todoist.TodoistAPI('79d4d663cc5011ab78cd7004e26a1a060572c823') # connect to todoist | |
api.sync() # get new data from todoist | |
therm.image('name.png') # print header image | |
therm.text('\n') # add a blank line |
#!/usr/bin/env bash | |
set -e | |
CONTEXT="$1" | |
if [[ -z ${CONTEXT} ]]; then | |
echo "Usage: $0 KUBE-CONTEXT" | |
exit 1 | |
fi |
// dm Klopapier Widget | |
// | |
// Copyright (C) 2020 by marco79 <marco79cgn@gmail.com> | |
// | |
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
#!/bin/bash | |
subject="Subject of my email" | |
txtmessage="This is the message I want to send" | |
username='mail@exemple.com' | |
password='************' | |
From="mail01@exemple.com" | |
rcpt='testemail5739230@yopmail.com' | |
from_name='N BOINA' | |
rcpt_name='Nicolas Hulot' |
Favorites: | |
Unrefined: | |
!(@home|@$WIFE|@phone|@laptop|@desk|@errand|@office|##$EMPLOYER|##Someday/Maybe) & !search:* | | |
(no priority & !search:* & !recurring & !##Someday/Maybe) | | |
(!search:: & !##Someday/Maybe & !recurring & !no priority) | | |
##Inbox, | |
(##Someday/Maybe|@not_now) & (!no due date|@next) | |
Home: |
#!/bin/bash -eu | |
# Increase Virtual Memory for Elasticsearch on GKE | |
# https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html | |
# Dependencies: kubectl, gcloud, jq | |
nodes() { | |
kubectl get nodes -o custom-columns=n:.metadata.name --no-headers | |
} |