Skip to content

Instantly share code, notes, and snippets.

View smaje99's full-sized avatar
🏠
Working from home

Sergio Andrés Majé Franco smaje99

🏠
Working from home
View GitHub Profile
@liviaerxin
liviaerxin / README.md
Last active February 23, 2026 17:34
FastAPI and Uvicorn Logging #python #fastapi #uvicorn #logging

FastAPI and Uvicorn Logging

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
@raftheunis87
raftheunis87 / hyperjs.md
Last active July 17, 2025 07:10
Hyper.js + Hyper.js Plugins + ZSH + Starship + Fira Code + Dark Theme - (macOS)

Hyper.js

@gourab5139014
gourab5139014 / create_hr_schema.sql
Last active November 14, 2025 00:42
Script to create Oracle XE's HR schema in Postgres
-- Best used for learning purposes. Original developer also has an ER diagram available at https://tinyurl.com/oracle-hr-schema-postgres
--create tables
BEGIN;
CREATE TABLE regions
( region_id SERIAL primary key,
region_name VARCHAR(25)
);
CREATE TABLE countries
@dariuszparys
dariuszparys / .hyper.js
Last active May 4, 2022 22:53
Hyper.js terminal settings with Fira Code
// This configuration is meant to be used in WSL v1 for Windows
// It is also not maintained anymore, as I switched to Windows Terminal
module.exports = {
config: {
// Disabling WebGL renderer to make font-ligatures work
// https://github.com/tolbertam/hyper-font-ligatures#disabling-webgl-rendering
webGLRenderer: false,
// default font size in pixels for all tabs
@rodrwan
rodrwan / binary-tree.js
Last active November 6, 2024 23:28
Implementación árbol binario en JavaScript
class Node {
constructor (value) {
this.value = value
this.right = null
this.left = null
}
}
class Tree {
constructor () {
@toadkicker
toadkicker / zindex.scss
Last active April 20, 2025 18:43 — forked from fat/gist:1f6da6b3bd0311a1f8a0
medium's z-index scale
// Copyright 2014 A Medium Corporation
//
// z-index.less
// Medium.com's z-index scale. Z-index values should always be defined in z-index.less. This
// allows us to at a glance determine relative layers of our application and prevents bugs
// arrising from arbitrary z-index values. Do not edit the z-index scale! Only add application
// scoped z-index values.
//This is the SASS version modified by @toadkicker.
@pbojinov
pbojinov / autofill.css
Created November 21, 2014 21:04
Removing input background color for Chrome autocomplete
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px white inset;
}
input:-webkit-autofill:focus {
-webkit-box-shadow: /*your box-shadow*/,0 0 0 50px white inset;
-webkit-text-fill-color: #333;
}
-webkit-text-fill-color: #838B95 !important;
@doobry
doobry / users.sql
Created July 26, 2011 13:15
MySQL user auth with stored procedures
/*
Possible SHA1 values 2^160 = 1.46150164 × 10^48
RAND() returns a float from 0 to 1 ~= 10^16
CONCAT(RAND(), RAND(), RAND())
*/