Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
We facepalm, we shrug and we hack around it and never look back.

MrPowerGamerBR MrPowerGamerBR

:shipit:
We facepalm, we shrug and we hack around it and never look back.
View GitHub Profile
@MrPowerGamerBR
MrPowerGamerBR / BlockPacketAdapter.kt
Last active Dec 7, 2021
Example of how to replace blocks in 1.18 chunk data, single block change and multi block change packets.
View BlockPacketAdapter.kt
package net.perfectdreams.dreamcustomitems.blocks
import com.comphenix.packetwrapper.WrapperPlayServerBlockChange
import com.comphenix.protocol.PacketType
import com.comphenix.protocol.events.*
import com.comphenix.protocol.wrappers.WrappedBlockData
import com.viaversion.viaversion.api.minecraft.chunks.PaletteType
import com.viaversion.viaversion.api.type.types.version.ChunkSectionType1_18
import io.netty.buffer.Unpooled
import net.minecraft.core.Registry
@MrPowerGamerBR
MrPowerGamerBR / paper.yml
Created Feb 28, 2021
SparklyPower Config 24/02/2021
View paper.yml
# This is the main configuration file for Paper.
# As you can see, there's tons to configure. Some options may impact gameplay, so use
# with caution, and make sure you know what each option does before configuring.
#
# If you need help with the configuration or have any questions related to Paper,
# join us in our Discord or IRC channel.
#
# Discord: https://discord.gg/papermc
# IRC: #paper @ irc.esper.net ( https://webchat.esper.net/?channels=paper )
# Website: https://papermc.io/
@MrPowerGamerBR
MrPowerGamerBR / patch-proxmox-to-allow-cloning-of-bind-mounts.md
Last active Feb 15, 2021
Patch Proxmox to allow cloning of bind mounts
View patch-proxmox-to-allow-cloning-of-bind-mounts.md

This is a workaround, I don't really like but it works

To allow cloning templates with bind mounts (Useful if you have folders that are shared, so you know that the folder will be accessible in clones), open /usr/share/perl5/PVE/API2/LXC.pm and find this part of the code (in my current version, it is line 1413)

		foreach my $opt (keys %$src_conf) {
		    next if $opt =~ m/^unused\d+$/;

		    my $value = $src_conf->{$opt};
View Extract Multiple Selected Motion Data With Frames.cs
// Extracts PiP tracking information to a CSV file
//
// Works with Vegas 17
//
// Based on this script: https://www.vegascreativesoftware.info/us/forum/beta-pin-image-video-to-motion-track--112837/?page=2
// With the help of this documentation: https://walkedby.com/other/VEGASScriptAPI.html
//
// How to Use: (Remember, this is a very hacky script!)
// 1. Select all the relevant track events
// 2. Run the script
View Extracts PiP tracking information to a CSV file.cs
// Extracts PiP tracking information to a CSV file
//
// Works with Vegas 17
//
// Based on this script: https://www.vegascreativesoftware.info/us/forum/beta-pin-image-video-to-motion-track--112837/?page=2
// With the help of this documentation: https://walkedby.com/other/VEGASScriptAPI.html
//
// How to Use: (Remember, this is a very hacky script!)
// 1. Select the track event
// 2. Run the script
@MrPowerGamerBR
MrPowerGamerBR / setup_sdn_internet.sh
Created Nov 8, 2020
Setups Internet Networking on a VXLAN network in Proxmox
View setup_sdn_internet.sh
# Setups routing for Internet on a SDN network (Proxmox)
SDN_IP_RANGE='10.0.3.0/24'
echo "Removing old up/down scripts..."
rm /etc/network/if-up.d/enable_sdn_internet.sh
rm /etc/network/if-post-down.d/disable_sdn_internet.sh
echo "Creating new up/down scripts..."
View map_colors.json
{
"0":{
"red":-1,
"green":-1,
"blue":-1
},
"1":{
"red":-1,
"green":-1,
"blue":-1
View ProxmoxStuff.md

Attention: This guide is super outdated and, while it works, this isn't really the best way to setup Proxmox!

Thanks to mmolitor87#7314 for helping me out on /r/admincraft's Discord server! I just rewrote what he said to make a nice and tidy post, to make it easier for me (and other users) to setup Proxmox on a new machine

In this tutorial I will use Windows Bash (via Windows Subsystem for Linux, running Ubuntu), but this tutorial will work with an Linux distro too.

First, go to your dedicated server dashboard and install Proxmox, SoYouStart (and OVH) has an option install Proxmox directly from the dashboard on the Reinstall option.

Choose Proxmox VE 5 (64 bits) (if you have multiple devices that you want to make a pool with, choose the option with ZFS), after that, wait until Proxmox is installed...

@MrPowerGamerBR
MrPowerGamerBR / assembly.asm
Created Aug 16, 2018
kk eae men o SAM é brabo
View assembly.asm
section .data
hello: db "Hello!", 10 ; 10 = pular linha (na tabela ASCII)
helloLen equ $-hello ; tamanho da string
kkEaeMen: db "kk eae men", 10
kkEaeMenLen equ $-kkEaeMen
section .text
global main
main:
mov ebp, esp; for correct debugging
mov eax, 4 ; system call para sys_write (4 = escreve para um arquivo ou um dispositivo)
View kotlin-incremental-compiler-error.log
[INFO] --- kotlin-maven-plugin:1.2.50:compile (compile) @ Loritta ---
[WARNING] Using experimental Kotlin incremental compilation
WARN: Failed to initialize native filesystem for Windows
java.lang.RuntimeException: Could not find installation home path. Please make sure bin/idea.properties is present in the installation directory.
at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:82)
at com.intellij.openapi.application.PathManager.findBinFile(PathManager.java:161)
at com.intellij.util.lang.UrlClassLoader.loadPlatformLibrary(UrlClassLoader.java:321)
at com.intellij.openapi.util.io.win32.IdeaWin32.<clinit>(IdeaWin32.java:48)
at com.intellij.openapi.util.io.FileSystemUtil.getMediator(FileSystemUtil.java:62)
at com.intellij.openapi.util.io.FileSystemUtil.<clinit>(FileSystemUtil.java:54)