Skip to content

Instantly share code, notes, and snippets.

View Gladorme's full-sized avatar
👀
Hi!

Guillaume LADORME Gladorme

👀
Hi!
View GitHub Profile
@stonar96
stonar96 / Anti-Xray.md
Last active March 4, 2024 15:16
Recommended Paper Anti-Xray settings by stonar96

❗ This has been moved to the official PaperMC docs ❗

Link: https://docs.papermc.io/paper/anti-xray

Help: https://discord.gg/papermc






Recommended Paper Anti-Xray settings by stonar96

General

Anti-Xray can be configured per world in the paper.yml configuration file. To understand how per world configuration works please read this first. Note that after changing any settings for Anti-Xray you have to restart your server. Executing the /reload command (you should never do this) won't apply the settings to worlds that are already loaded.

@noelbundick
noelbundick / LICENSE
Last active April 11, 2024 16:12
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@zekroTJA
zekroTJA / readme.md
Last active July 28, 2023 18:51
How to build an embed Builder in JDA

Required Imports

import net.dv8tion.jda.core.EmbedBuilder;
import java.awt.Color;

Build the EmbedBuilder

@angristan
angristan / hosts
Last active May 31, 2020 15:00
Windows 10 Privacy Hosts file
0.0.0.0 choice.microsoft.com
0.0.0.0 choice.microsoft.com.nsatc.net
0.0.0.0 df.telemetry.microsoft.com
0.0.0.0 diagnostics.support.microsoft.com
0.0.0.0 feedback.microsoft-hohm.com
0.0.0.0 feedback.search.microsoft.com
0.0.0.0 feedback.windows.com
0.0.0.0 oca.telemetry.microsoft.com
0.0.0.0 oca.telemetry.microsoft.com.nsatc.net
0.0.0.0 onesettings-bn2.metron.live.com.nsatc.net
@Pokechu22
Pokechu22 / Setting up MCP without a full MCP release.md
Last active March 31, 2024 21:35
Setting up MCP for newer versions (e.g. 1.12.2)

It's possible to use create an MCP installation for versions of Minecraft where there hasn't been a full MCP release. It takes a little bit of manual setup, but the end result is highly useful.

  1. Download and extract the most recent MCP build from http://www.modcoderpack.com/. (Currently, the latest build is http://www.modcoderpack.com/files/mcp940.zip)

  2. Edit version.cfg in the conf folder, and change ClientVersion and ServerVersion to the version you want (for instance, 1.12.2).

  3. Download the SRG zip for the version you want; these can generally be found at http://mcpbot.bspk.rs/mcp/<version>/mcp-<version>-srg.zip (for example, http://mcpbot.bspk.rs/mcp/1.11.2/mcp-1.11.2-srg.zip) or at http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/<version>/mcp-<version>-srg.zip (for example, http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip). (For 1.12.1 and 1.12.2, only the minecraftforge link works)

  4. Extract that zip into the MCP conf folder, over

@jboner
jboner / latency.txt
Last active May 2, 2024 09:45
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}