Skip to content

Instantly share code, notes, and snippets.

View VitorBlog's full-sized avatar
🏠
Working from home

Vitor Paulo VitorBlog

🏠
Working from home
View GitHub Profile
@VitorBlog
VitorBlog / _README.md
Last active April 16, 2024 18:29
Create pull request on git push with Azure DevOps CLI

Create pull request on git push with Azure DevOps CLI

First Steps

  1. Define your organization and project at the $organization variable, example:
organization="google/gemini"
  1. Install and configure the Azure DevOps CLI, Learn.Microsoft.com.
  2. Execute the file in your repository folder.
@VitorBlog
VitorBlog / Debian_Discord_Updater_README.md
Last active May 15, 2024 22:11
Debian discord updater

Debian Discord Updater

Keeping your Discord client up-to-date is now hassle-free with this simple updater script.

Usage

Just execute the script, and it will handle the update process seamlessly.

Setting Up Automatic Updates

To ensure Discord update on boot, follow these steps:

  1. Open the crontab file using the command:
@VitorBlog
VitorBlog / amoled-discord.js
Created November 24, 2020 00:03
"Amoled Dark" Discord
// "Amoled Dark" Discord - Press Ctrl + Shift + I and paste-me
var style=document.createElement("style");style.type="text/css",style.innerHTML=".theme-dark {--background-primary: #000;--background-secondary: #171717;--background-secondary-alt: #000;--background-tertiary: #000;--channeltextarea-background: #171717;--background-accent: #202020;--background-accent: #202020;--background-accent: #202020;--background-accent: #202020;--background-accent: #202020;--background-accent: #000;} .tabBody-3YRQ8W {background: #000;}",document.getElementsByTagName("head")[0].appendChild(style);
@VitorBlog
VitorBlog / MinecraftColor.kt
Last active July 7, 2020 23:26
MinecraftColors to HEX
import java.awt.Color
object MinecraftColor {
val DARK_BLUE = Color.decode("#0000AA")
val DARK_GREEN = Color.decode("#00AA00")
val DARK_AQUA = Color.decode("#00AAAA")
val DARK_RED = Color.decode("#AA0000")
val DARK_PURPLE = Color.decode("#AA00AA")
val DARK_GRAY = Color.decode("#555555")
@VitorBlog
VitorBlog / HasteBin.java
Last active December 7, 2021 04:17
Create a hastebin using Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.stream.Collectors;
public class HasteBin {
@VitorBlog
VitorBlog / Main.java
Last active December 7, 2021 04:17
UpdateChecker usando Github. Coloque o titulo da release igual a versão da plugin.yml
public void checkUpdate(){
String version = this.getDescription().getVersion();
try {
//Abrindo conexão
URL url = new URL("https://api.github.com/repos/User/Repositório/releases/latest");
URLConnection connection = url.openConnection();
//Convertendo dados
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));