Skip to content

Instantly share code, notes, and snippets.

View angeloevangelista's full-sized avatar
🌎
Studying (why a globe?)

Angelo angeloevangelista

🌎
Studying (why a globe?)
  • Lab2Dev
  • São Paulo
View GitHub Profile
@angeloevangelista
angeloevangelista / build.gradle
Created June 30, 2020 21:06
This is a fix for 'Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0'
//project/android/app/build.gradle
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true // add this line ;)
}
@angeloevangelista
angeloevangelista / post-install.sh
Last active October 31, 2020 01:18
Script para instalação de aplicativos no ubuntu
#!/usr/bin/env bash
# ----------------------------- VARIÁVEIS ----------------------------- #
PPA_LIBRATBAG="ppa:libratbag-piper/piper-libratbag-git"
PPA_GRAPHICS_DRIVERS="ppa:graphics-drivers/ppa"
PPA_ULAUNCHER="ppa:agornostal/ulauncher"
PPA_DOCKER="https://download.docker.com/linux/ubuntu"
URL_MICROSOFT_PROD="https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb"
URL_HYPER_TERMINAL="https://releases.hyper.is/download/deb"
URL_ULAUNCHER="https://github.com/Ulauncher/Ulauncher/releases/download/5.8.0/ulauncher_5.8.0_all.deb"
@angeloevangelista
angeloevangelista / settings.json
Last active January 11, 2023 23:31
Configurações para o Visual Studio Code
{
"security.workspace.trust.untrustedFiles": "open",
"workbench.editor.labelFormat": "short",
"workbench.iconTheme": "material-icon-theme",
"breadcrumbs.filePath": "on",
"breadcrumbs.enabled": true,
"files.eol": "\n",
"use strict";
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
// default font size in pixels for all tabs
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/angelo/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
[user]
name = Angelo Evangelista
email = angeloevan.ane@gmail.com
[core]
editor = code
excludesfile = ~/gitignore
quotepath = false
[color]
status = auto
branch = auto
@angeloevangelista
angeloevangelista / xorg.conf
Last active October 30, 2020 01:15
This file fixes glitches on resize on PopOs. Create this file on /etc/X11
Section "Module"
Load "dri3"
EndSection
Section "Device"
Identifier "Intel Graphics"
@angeloevangelista
angeloevangelista / fix-pulse-audio.txt
Created August 19, 2020 23:52
To fix Pulse Audio auto-ajust
sudo cp -vR /usr/share/pulseaudio/alsa-mixer/paths /usr/share/pulseaudio/alsa-mixer/paths_backup
sudo perl -pi -0 -e 's/(\[[A-Za-z ]*Mic Boost\][A-Za-z._=\s-]+volume *= *)merge/\1zero/g;' /usr/share/pulseaudio/alsa-mixer/paths/*
sudo diff -r -C 5 /usr/share/pulseaudio/alsa-mixer/paths_backup /usr/share/pulseaudio/alsa-mixer/paths
#!/bin/bash
mkdir -p ./aula/SO/arquivos aula/SO/textos aula/SO/trabalhos
cd aula
for i in 1 2 3 4 5 6;
do
touch $i.txt;
done;
const convertMinutes = (totalInMinutes, short = false) => {
let hours = Math.floor(totalInMinutes / 60).toFixed(0);
const minutes = totalInMinutes % 60;
const days = Number(Math.floor(hours / 24).toFixed(0));
hours = hours % 24;
let result = '';