Skip to content

Instantly share code, notes, and snippets.

View fcidade's full-sized avatar
🐍
Coding?

Francisco Cidade Homem Júnior fcidade

🐍
Coding?
View GitHub Profile
@fcidade
fcidade / wsl2-aws-vault.md
Created January 3, 2025 18:37 — forked from unfor19/wsl2-aws-vault.md
How to run aws-vault on WSL2 Ubuntu 20.04

I'm glad to see that I'm not the only one who had issues with it 😄 This is how I'm using aws-vault in WSL2 and Ubuntu 20.04

Short version

# All the commands are executed in a WSL2 terminal

# Download
AWS_VAULT_VERSION="v6.3.1" && \
@fcidade
fcidade / aws-tunnel
Created November 5, 2024 13:03 — forked from brunoyb/aws-tunnel
#!/bin/sh
instance_id=
host=
port=
local_port=
show_help() {
cat << EOF
Usage: ${0##*/} [OPTION]... <HOST> <PORT> <LOCAL_PORT>
@fcidade
fcidade / ToonDitheringShader.shader
Created January 4, 2023 21:14
Unlit Toon Dithering Shader
Shader "Unlit/Dithering"
{
Properties
{
_MainColor ("Main Color", Color) = (1, 0, 0, 1)
_ShadowColor ("Shadow Color", Color) = (0,0,0,1)
_Detail ("Details", Range(0, 1)) = 2
_DitherPattern ("Dithering Pattern", 2D) = "white" {}
_DitherSize ("Dithering Size", Range(0, 1)) = 1
}
@fcidade
fcidade / Movement.cs
Created December 29, 2022 22:47
Simple yet powerful Movement System for Unity - Based on CatLikeCoding
using UnityEngine;
public class Movement : MonoBehaviour
{
[SerializeField, Range(0f, 100f)]
float maxSpeed = 10f;
[SerializeField, Range(0f, 100f)]
float maxAcceleration, maxAirAcceleration = 100f;
@fcidade
fcidade / wpp.pyw
Last active December 30, 2019 14:21
Change windows wallpaper each 10 seconds
import ctypes
from pathlib import Path
import schedule, time
def change_wallpaper():
path_to_image = f'{Path().absolute()}\\image_name.jpg'
print(path_to_image)
ctypes.windll.user32.SystemParametersInfoW(20, 0, path_to_image , 0)
schedule.every(10).seconds.do(change_wallpaper)
@fcidade
fcidade / uploadall.sh
Last active October 27, 2019 18:15
Upload all folders from project into a single repository
# Instruções:
# Modifique o nome das suas pastas (ou as renomeie para ter o mesmo nome do script).
# Em seguida rode: sh uploadall.sh
# Todas as pastas a seguir devem estar no local onde o script foi executado.
# Pastas
db="db"
backend="backend"
oshi="oshi"
totem="totem-simulator"
syntax on
set nu
filetype plugin on
set mouse=a
set number
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set clipboard=unnamed

Comandos git

Preciso fazer uma alteração no código da aplicação, quais passos devo seguir?

Passo 1: Crie uma nova branch

Uma branch é como uma cópia da aplicação em seu estado atual, onde você pode edita-la sem afetar a produção e em seguida enviar o código alterado para ser avaliado e adicionado à master (branch principal, normalmente utilizada para a produção).

Para criar uma branch, existe o comando checkout:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title></title>
<!--[if !mso]><!-- -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css"> #outlook a { padding: 0; } .ReadMsgBody { width: 100%; } .ExternalClass { width: 100%; } .ExternalClass * { line-height:100%; } body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } table, td { border-collapse:collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; } img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; } p { display: block; margin: 13px 0; }</style>