Skip to content

Instantly share code, notes, and snippets.

View nosrednawall's full-sized avatar

Anderson José de Souza Inácio nosrednawall

View GitHub Profile
@nosrednawall
nosrednawall / ggplot_com_grid.R
Created November 3, 2024 21:30
Exemplo de aplicação de Gráficos com a biblioteca ggplot e utilizando grid
#########################################################################
########## Dados
###########################################################################
require(dplyr)
require(ggplot2)
library(tidyverse)
require(tidyr)
require(data.table)
@nosrednawall
nosrednawall / calcula_sistemas_primeiro_grau.py
Last active March 9, 2024 14:56
Código que calcula sistemas de primeiro grau, precisa necessariamente ter duas incógnitas que estão sendo igualadas a algum valor.
#!/usr/bin/env python3
# coding=utf8
# ----------------------------------------------------------------------------
# Created By : Anderson José de Souza Inácio
# Created Date: 2024-03-09
# version ='1.0'
# ---------------------------------------------------------------------------
""" Curso Estatística 2024 UFPR
Disciplina CI182 Fundamentos de Programacao de Computadores
Aula 3 Exercício 3.6 - 3 eqSist
@nosrednawall
nosrednawall / nvidia-sleep.sh
Created November 6, 2023 22:54
Corrige congelamento de tela após hibernar com gnome
#!/bin/bash
#arquivo salvo em /usr/bin/nvidia-sleep.sh
if [ ! -f /proc/driver/nvidia/suspend ]; then
exit 0
fi
RUN_DIR="/var/run/nvidia-sleep"
XORG_VT_FILE="${RUN_DIR}"/Xorg.vt_number
@nosrednawall
nosrednawall / docker-jellyfin.sh
Created October 30, 2022 22:44
gerar container jellyfin
docker run -d \
--name jellyfin \
--user uid:gid \
--net=host \
--volume jellyfin-config:/config \
--volume jellyfin-cache:/cache \
--mount type=bind,source=/media/hd-multimedia/anime-hd-3/Animes3,target=/Animes3 \
--mount type=bind,source=/media/hd-multimedia/backup/StreamingMiniDLNA/Animes,target=/Animes \
--mount type=bind,source=/media/hd-multimedia/backup/StreamingMiniDLNA/Animes2,target=/Animes2 \
--restart=unless-stopped \
@nosrednawall
nosrednawall / install_vnc_debian.md
Created October 30, 2022 18:10
install vnc on debian
@nosrednawall
nosrednawall / mover_arquivos_subpastas.py
Created October 29, 2022 23:01
move todos os arquivps de um tipo, das subpastas para a pasta mae
import os
import re
import shutil
import glob
def mover_arquivo_subpastas():
path = r"/home/anderson/Vídeos/Mob Pyscho 100 (2016)/mob_s3/" # caminho da pasta
files = glob.glob(path + '/**/*.mkv', recursive=True) # gera uma lista dos arquivos no tipo especificado, mkv, recusivamente
for file in files:
padrao = re.compile(r"[^\\/]+?(?=$)") # regex para pegar o nome do arquivo mais a extensão, ignorando todo o path
@nosrednawall
nosrednawall / install_unifi_debian_11.txt
Created September 15, 2022 00:50 — forked from sinofool/install_unifi_8_debian_12.txt
Install Unifi Controller on Debian 11 (Bullseye)
# Java 8
curl -fsSL "https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public" | sudo gpg --dearmor --yes -o /usr/share/keyrings/adoptopenjdk-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/adoptopenjdk-archive-keyring.gpg] https://adoptopenjdk.jfrog.io/adoptopenjdk/deb bullseye main" | sudo tee /etc/apt/sources.list.d/adoptopenjdk.list
sudo apt-get update && sudo apt-get install -y adoptopenjdk-8-hotspot
# MongoDB 3.6
wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add -
echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
# Unifi
@nosrednawall
nosrednawall / resolve.md
Last active September 7, 2022 00:27
noise p2 archlinux

$ sudo pacman -S sox

$ mkdir -p ~/.config/systemd/user/

$ vim ~/.config/systemd/user/usb-audio-keep-alive.service

[Unit]
Description=Keep USB Audio Alive Using sox
@nosrednawall
nosrednawall / .bashrc
Created August 23, 2022 00:45
Vim como editor padrão no ranger
# Adicione o export abaixo em seu bashrc ou zshrc
export VISUAL="vim"
@nosrednawall
nosrednawall / colors.rasi
Created August 19, 2022 22:04
Fix error $FG not declared Rofi Archcraft
/* vim .config/i3/rofi/themes/colors.rasi */
/* Copyright (C) 2020-2022 Aditya Shakya <[email protected]> */
/* Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 */
* {
background: #1e222a;
background-alt: #262A32;
foreground: #c8ccd4;
FG: #c8ccd4; /* Just add this line */
selected: #61afef;