Skip to content

Instantly share code, notes, and snippets.

View skvggor's full-sized avatar
📚
Rust saga 🛩️

Marcos Lima skvggor

📚
Rust saga 🛩️
View GitHub Profile

Metodologia Ship, Show e Ask 🚀

A metodologia Ship, Show e Ask é uma abordagem eficiente para gerenciar e comunicar diferentes tipos de mudanças no código dentro de uma equipe de desenvolvimento de software. Adotar essa metodologia pode ajudar a melhorar a colaboração, a qualidade do código e a eficiência do fluxo de trabalho, especialmente quando combinada com ferramentas de controle de versão, como o Git.

Ship 🏁

Ajustes rápidos e simples que não exigem revisão pelos pares. Essas mudanças podem ser feitas diretamente na branch main.

  • Adicionar funcionalidades simples
  • Corrigir bugs menores
@liviaerxin
liviaerxin / README.md
Last active May 15, 2024 14:40
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
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 17, 2024 13:15
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@sindresorhus
sindresorhus / esm-package.md
Last active May 17, 2024 14:07
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
["<!DOCTYPE>","<a>","</a>","<abbr>","</abbr>","<acronym>","</acronym>","<address>","</address>","<applet>","</applet>","<area>","</area>","<article>","</article>","<aside>","</aside>","<audio>","</audio>","<b>","</b>","<base>","</base>","<basefont>","</basefont>","<bdi>","</bdi>","<bdo>","</bdo>","<big>","</big>","<blockquote>","</blockquote>","<body>","</body>","<br>","</br>","<button>","</button>","<canvas>","</canvas>","<caption>","</caption>","<center>","</center>","<cite>","</cite>","<code>","</code>","<col>","</col>","<colgroup>","</colgroup>","<data>","</data>","<datalist>","</datalist>","<dd>","</dd>","<del>","</del>","<details>","</details>","<dfn>","</dfn>","<dialog>","</dialog>","<dir>","</dir>","<div>","</div>","<dl>","</dl>","<dt>","</dt>","<em>","</em>","<embed>","</embed>","<fieldset>","</fieldset>","<figcaption>","</figcaption>","<figure>","</figure>","<font>","</font>","<footer>","</footer>","<form>","</form>","<frame>","</frame>","<frameset>","</frameset>","<h1>","</h1>","<h2>","</h2>","<h3>
@hankpillow
hankpillow / index.js
Last active May 19, 2020 19:57
Lambda for Bitbucket webhook with Google Chat
var https = require('https');
var parse = require("url").parse;
exports.handler = async (data) => {
const chatURL = process.env.CHAT_URL
if (!chatURL){
return {
statusCode: 400,
body: JSON.stringify('missing google chat webhook'),
@skvggor
skvggor / yesterday.js
Last active May 4, 2018 17:13
Get yesterday - format: yyyy-mm-dd
function yesterday() {
'use strict';
var date = new Date();
function formatNumberTo2Digits(number) {
return ('0' + (number)).slice(-2);
}
// magic
@brenopolanski
brenopolanski / export-svg-inkscape.md
Created December 26, 2017 13:29
Exporting an object as svg from inkscape
  1. Select the object(s) to export
  2. Open the document properties window (Ctrl+Shift+D)
  3. Select "Resize page to drawing or selection"
  4. File > Save As Copy...
  5. Select Optimized SVG as the format if you want to use it on the web
@skvggor
skvggor / app.js
Created September 26, 2017 02:57
Organizing events
const Vue = require('../../node_modules/vue/dist/vue.common.js');
const App = new Vue({
delimiters: ['${', '}'],
el: '#app',
data: {
message: 'Default message',