Skip to content

Instantly share code, notes, and snippets.

View olivatooo's full-sized avatar
💭
I'm making a note here: HUGE SUCCESS.

Gabriel Olivato olivatooo

💭
I'm making a note here: HUGE SUCCESS.
View GitHub Profile
@olivatooo
olivatooo / gist:0597d1346a4fdfa1198e1fe04c638330
Last active March 4, 2021 21:15
Arch Linux xXx_420_GAMER_Sl4yer_︻デ═一_xXx

for Intel:

paru -S chaotic-nvidia-dev-dkms-tkg chaotic-nvidia-dev-utils-tkg lib32-chaotic nvidia-dev-utils-tkg wine-git linux-tkg-bmq-zen linux-tkg-bmq-zen-headers

for AMD:

paru -S chaotic-nvidia-dev-dkms-tkg chaotic-nvidia-dev-utils-tkg lib32-chaotic nvidia-dev-utils-tkg wine-git linux-tkg-bmq-zen linux-tkg-bmq-zen-headers
@olivatooo
olivatooo / SOLID.md
Last active November 21, 2020 03:21
Trabalho feito para disciplina de POOA

SOLID

Gabriel Olivato RA: 743537

Igor Magollo RA: 743550

(S)ingle Responsability Principle

O Single Responsability Principle , SRP, afirma que um componente de um software (no geral uma classe) deve possuir uma única responsabilidade. Isto significa que uma classe deve ter a responsabilidade de fazer uma (e apenas uma) tarefa bem feita, e como consequência disso quando queremos alterar esta funcionalidade alteramos apenas quem é responsável por ela.

Se o domínio do problema mudar, então a classe que resolve aquele problema deve ser atualizada. Se nós precisamos fazer alterações a esta classe, por algum motivo diferente, significa que aquela classe possui muitas responsabilidades.

@olivatooo
olivatooo / botMessage.js
Created November 13, 2020 13:41
Send message from AWS Lamdba to discord bot webhook
var zlib = require("zlib");
const https = require("https");
exports.handler = function (input, context) {
console.log(input)
var payload = Buffer.from(input.awslogs.data, "base64");
zlib.gunzip(payload, function (e, result) {
if (e) {
context.fail(e);
} else {
@olivatooo
olivatooo / ping.cpp
Last active May 7, 2020 20:09
A simple portable C++ ping using popen
// C++ Libraries
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
template <typename TP> std::string Num2Str(TP const& value ){
std::stringstream sin;
sin << value;
@olivatooo
olivatooo / far.sh
Created March 8, 2020 22:13
Script to find and replace recursively using sed
#!/bin/bash
# find_and_replace.sh
echo "Find and replace in current directory!"
echo "File pattern to look for? (eg '*.txt')"
read filepattern
echo "Existing string?"
read existing
echo "Replacement string?"
read replacement
@olivatooo
olivatooo / matrix_multiplication.cu
Created December 1, 2019 16:07
Matrix multiplication using cuda
#include <stdio.h>
#include <stdlib.h>
#define SIZE 10
#define VALUE 5
#define BLOCK_SIZE 16
__global__ void gpu_matrix_mult(int *a,int *b, int *c, int dim_matrix)
{
@olivatooo
olivatooo / polybar.sh
Last active August 3, 2020 05:04
Bash script to randomly select an wallpaper and use wal to set the system colorscheme. Useful for i3+wal!
#!/bin/bash
## Author : Aditya Shakya
## Github : adi1090x
## Edited by me
PDIR="$HOME/.config/polybar"
LAUNCH="polybar-msg cmd restart"
# Replacing colors
#
#
# Created by Olivato :D
#
#
import pygame, sys
from pygame.locals import *