Skip to content

Instantly share code, notes, and snippets.

@axyiee
axyiee / Cache.kt
Created January 31, 2020 10:30
Sistema de cache usando o Guava (não testado)
@file:JvmName("GuavaCache")
package dev.watermc.core.controllers.cache
import com.google.common.cache.CacheBuilder
import com.google.common.cache.CacheLoader
import com.google.common.cache.LoadingCache
import com.google.common.collect.ImmutableMap
import java.util.concurrent.TimeUnit
/*
@axyiee
axyiee / Otimizando seu servidor.md
Last active March 22, 2021 15:48
[Tópico] Otimizando seu servidor

Apresentação

» Este tópico é uma tradução incompleta de uma thread no fórum do Spigot, caso queira vê-la por completo, use o link a seguir: https://www.spigotmc.org/threads/guide-server-optimization%E2%9A%A1.283181/

Dicas

1. Uma dica muito útil, é utilizar o PaperSpigot em seu servidor. PaperSpigot conta com várias otimizações nas quais o Spigot padrão infelizmente não possui, e nas suas versões mais recentes (1.14+) inclui um async chunk loading, no qual ajuda de mais na performance do seu servidor.

2. Evite alocações na memória desnecessárias em seus códigos, requisições em excesso, etc. Você pode usar o cache para isso.

package br.com.nekkan.kotlin4bukkit.command.impl
import br.com.nekkan.kotlin4bukkit.command.CommandBase
import br.com.nekkan.kotlin4bukkit.command.Subcommand
import org.bukkit.Bukkit
import org.bukkit.OfflinePlayer
import org.bukkit.command.Command
import org.bukkit.command.CommandSender
import org.bukkit.entity.Player
import java.util.*
package br.com.nekkan.kotlin4bukkit.dsl.scoreboard.impl
import br.com.nekkan.kotlin4bukkit.architecture.KotlinPlugin
import br.com.nekkan.kotlin4bukkit.dsl.scoreboard.BaseScoreboard
import br.com.nekkan.kotlin4bukkit.extension.DSL
import br.com.nekkan.kotlin4bukkit.extension.board.getTeamOrCreate
import org.bukkit.Bukkit
import org.bukkit.ChatColor
import org.bukkit.entity.Player
import org.bukkit.scoreboard.DisplaySlot
#!/bin/bash
#Variables and utility.
REPOSITORY="https://github.com/nekkan/nodejs-es11-template.git"
ITALICCYAN="\e[3;36m"
GREEN="\e[0;32m"
PURPLE="\e[0;35m"
GRAY="\e[0;37m"
YELLOW="\e[0;33m"
CYAN="\e[0;36m"
package kodya.gateway.utils
import java.lang.ref.*
import kotlin.reflect.KProperty
enum class ReferenceType {
Weak, Soft;
}
fun <T> reference(
@axyiee
axyiee / improving_gaming_performance_on_linux.md
Last active May 29, 2021 15:25
Improving Gaming Performance on Linux

This article is under construction.

Improving Gaming Performance on Linux

Since I started using an AMD GPU months ago, I have been looking for ways to increase its performance under Linux. I got good results and will share the same way I did until then. Most of the steps can serve even if you don't have an AMD GPU, as I will leave the AMD-only steps last.

Frankly, the gaming performance on Linux is already good on its own without additional configurations. But if you want to go further, this guide can help you.

@axyiee
axyiee / .minified.js
Last active May 11, 2021 14:08
Black theme for Discord
!function(){const e=document.createElement("style");(document.head||document.getElementsByTagName("head")[0]).appendChild(e),e.appendChild(document.createTextNode(` .theme-dark{--background-tertiary:#040405;--background-secondary:#040405;--background-primary:#040405;--deprecated-panel-background:#040405;--deprecated-card-bg:#040405;--deprecated-card-editable-bg:#040405;--channeltextarea-background:#18191c;--background-modifier-selected:#040405;--background-modifier-hover:#040405;--deprecated-store-bg:#040405;--background-floating:#040405;--background-accent:#040405;--background-secondary-alt:#040405;--header-primary:#dcddde;--text-normal:#dcddde;--text-muted:#dcddde;--interactive-active:#4fdc7b;--info-help-foreground:#4fdc7b;--main-color:#4fdc7b;--text-link:#4fdc7b;--header-secondary:#dcddde}.theme-dark .body-3iLsc4,.theme-dark .footer-1fjuF6,.css-15ejc46-control,.theme-dark .searchBox-3Y2Vi7,.theme-dark .searchResultsContainer-1ma_dc,.theme-dark .root-1gCeng,.theme-dark .perksModal-fSYqOq,.theme-dark .perk-2
@axyiee
axyiee / .md
Last active May 28, 2021 16:58
How to create an Android VM on Linux
@axyiee
axyiee / bot.go
Created November 29, 2021 18:26
A discord.go example written obviously in Go.
package main
import (
"flag"
"fmt"
"github.com/bwmarrin/discordgo"
"github.com/joho/godotenv"
"github.com/manifoldco/promptui"
"os"
"os/signal"