Skip to content

Instantly share code, notes, and snippets.

View sergiosvieira's full-sized avatar

Sérgio Vieira sergiosvieira

  • Fortaleza
View GitHub Profile
@sergiosvieira
sergiosvieira / aula.md
Last active August 24, 2024 15:08
Minicurso - Primeiro jogo com Godot

Slide 33

extends Area2D

@export var speed = 400 # Quão rápido o jogador se moverá (pixels/segundo).
var screen_size # Tamanho da janela do jogo.

# Chamado quando o nó entra na árvore de cenas pela primeira vez.
# A função _ready() é chamada quando um nó entra na árvore de cenas, o que é um bom momento para descobrir o tamanho da janela do jogo:
@sergiosvieira
sergiosvieira / gist:92715d137a5aa7b8b80d74c5efd870cf
Last active September 7, 2024 17:47
Compilar ns3 com 5glena v2x
git clone https://gitlab.com/cttc-lena/ns-3-dev.git
cd ns-3-dev
cd contrib
git clone https://gitlab.com/cttc-lena/nr.git
cd nr
git branch -r --list v2x-v
git checkout 5g-lena-v2x-v0.3.y
cd ../..
git checkout -b v2x-lte-dev origin/v2x-lte-dev
git tag -l "v2x"
@sergiosvieira
sergiosvieira / replacing_seaborn_distplot.ipynb
Created February 27, 2024 11:25 — forked from mwaskom/replacing_seaborn_distplot.ipynb
A guide to replacing the deprecated `seaborn.distplot` function.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sergiosvieira
sergiosvieira / git-workflow.md
Last active January 31, 2024 01:22
Git Workflow for Small Teams

Git Workflow for Small Teams

  1. Create a development branch on your local repository.
$ git checkout --track origin/development
  1. Work on your task as usual. Remember to make frequent commits to keep track of your progress.
$ git checkout -b task_name # Create the task branch
@sergiosvieira
sergiosvieira / multiple_ssh_setting.md
Created August 15, 2022 22:16 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@sergiosvieira
sergiosvieira / gist:42428518a791f8c3f8a89b95b22484c2
Created December 7, 2021 11:42
Acentuação qtcreator + windows 10
system("chcp 65001 > nul");
@sergiosvieira
sergiosvieira / 3parts.cpp
Created April 1, 2021 17:42
Find different parts of a string when it is sliced into 3 parts.
#include <iostream>
#include <vector>
using std::cout;
using Inputs = std::vector<std::string>;
/*
Find different parts of a string when it is sliced into 3 parts.
*/
@sergiosvieira
sergiosvieira / longest.cpp
Created March 31, 2021 14:15
Find the longest contiguous sequence of integer in "a" that belongs to vector "b"
#include <iostream>
#include <vector>
#include <algorithm>
using std::cout;
using Vector = std::vector<int>;
std::ostream& operator<<(std::ostream& out, const Vector& v) {
out << "[";
@sergiosvieira
sergiosvieira / main.cpp
Created March 20, 2021 11:44
float comparasion
bool approximatelyEqual(float a, float b, float epsilon)
{
return fabs(a - b) <= ( (fabs(a) < fabs(b) ? fabs(b) : fabs(a)) * epsilon);
}
bool essentiallyEqual(float a, float b, float epsilon)
{
return fabs(a - b) <= ( (fabs(a) > fabs(b) ? fabs(b) : fabs(a)) * epsilon);
}
@sergiosvieira
sergiosvieira / script.ph
Created March 15, 2021 13:25
set volume above 100% on linux
#!\bin\bash
pactl -- set-sink-volume 0 +50%