Skip to content

Instantly share code, notes, and snippets.

@Fabricio20
Fabricio20 / gist:b965c79377f87ef9cdf3
Last active February 16, 2021 16:35
Resetting Worlds Spigot - Fabricio20
// This Reset one is hand-made and may not work, but these are the methods and the sequence you need to follow.
public void reset(World world) { // Please modify to your needs
Bukkit.getServer().unloadWorld(world, false); // False = Not Save
Bukkit.getServer().runTaskLater(Main.getInstance(), new Runnable(){ // Run It Later to make sure its unloaded.
@Override
public void run() {
final File srcWorldFolder = new File("plugins/YourPluginNameCaseSensitive/" + world.getName() + "/" + world.getName()); // Backup world folder location
final File worldFolder = new File(world.getName()); // World folder name
deleteFolder(worldFolder); // Delete old folder
copyWorldFolder(srcWorldFolder, worldFolder); // Copy backup folder
@Fabricio20
Fabricio20 / SimpleConfig.java
Created August 11, 2015 20:40
SimpleConfig Lib For SpigotMC
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
@Fabricio20
Fabricio20 / gist:94c227a7d6392a4efa79
Created August 30, 2015 02:31
Regras - Server Admin Chat | BR |
1: Não Divulgue Servidores
2: Não Envie Links Para Ganhar Dinheiro/Coisas (adf.ly, etc..)
3: Não Pingue O Chat. ( Enviar Imagem / Alterar O Topico / Enviar Um Contato / Enviar Um Arquivo )
4: Evite brigas, caso seja pedido para levá-las ao privado, faça-o.
Este é um chat de ajuda para administradores de servidores, adicione quem achar nescessario.
- Fabricio20 @ 2015
@Fabricio20
Fabricio20 / Combat Ships
Last active May 16, 2016 18:29
Elite: Dangerous Ship Builds By Fabricio20, alerok_147 @ Ghost Legion
http://coriolis.io/outfit/vulture/24A5E4A3A5A4E3C1e1e040400004a2b27252h.AwRj4zyA.Aw19kA==?bn=Combat%20Vulture
@Fabricio20
Fabricio20 / ufw.sh
Created January 27, 2017 05:08
UFW "fix" for anything, used over ssh
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
sudo ufw disable
@Fabricio20
Fabricio20 / keybase.md
Last active June 17, 2022 16:55
keybase.md

Keybase proof

I hereby claim:

  • I am fabricio20 on github.
  • I am fabricio20 (https://keybase.io/fabricio20) on keybase.
  • I have a public key whose fingerprint is 4E12 EBEA 7DBE BACB 449D C873 A557 792D CDEC 47DA

To claim this, I am signing this object:

@Fabricio20
Fabricio20 / Users-Service.md
Last active June 21, 2017 22:51
DiscordBans RESTful Responses

PATH: /users/{id}
METHOD: GET
Description: Returns a user profile (with all info).

{
    "heat": 10,
    "names": [
        {
            "name": "LewdBot",
            "time": {
>scheduling jitter
total measurement interval: 735.587 milliseconds
measurement latency: 0.25424 milliseconds
average above measurement: 0.477161 milliseconds
worst case (this is what matters): 50.3514 milliseconds
@Fabricio20
Fabricio20 / ReadMe.md
Last active November 7, 2023 04:37
Docker - Nginx + PHP FPM + MariaDB + PhpMyAdmin

Docker

This is a docker-compose template for a lemp stack.

Make sure to change both the root password under the mysql service, and the absolute URI on the phpmyadmin container.
You can also expose phpMyAdmin locally instead of remotely by properly configuring the ports.

Default locations:
(Original) -> (Your server)
/var/www/html -> ./webroot
/etc/nginx -> ./nginx

Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: January 14th 2016
; Tutorial: https://www.tenforums.com/tutorials/37432-add-lock-drive-context-menu-bitlocker-drives-windows-10-a.html
; Needs the file below (VB file) on System32
[HKEY_CLASSES_ROOT\Drive\shell\lock-bde]
"AppliesTo"="System.Volume.BitLockerProtection:=1 OR System.Volume.BitLockerProtection:=3 OR System.Volume.BitLockerProtection:=5 NOT C:"