Skip to content

Instantly share code, notes, and snippets.

View modmuss50's full-sized avatar
:octocat:
I may be slow to respond.

modmuss modmuss50

:octocat:
I may be slow to respond.
View GitHub Profile
@koush
koush / .bash_profile
Last active February 23, 2022 23:54
Put this in your .bash_profile(s) to open VS Code on your local machine while SSH'd into a remote machine.
# this needs to be on the *remote* machine.
if [ ! -z "$SSH_CLIENT" ]
then
function code() {
local ssh_client_host=$(echo $SSH_CLIENT | cut -d ' ' -f1)
if [ -z "$1" ]
then
local argpath="."
@Juuxel
Juuxel / ImplementedInventory.java
Last active November 21, 2023 05:23
Implemented Inventory -- a simple SidedInventory implementation
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.Inventories;
import net.minecraft.inventory.Inventory;
import net.minecraft.inventory.SidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.math.Direction;
import org.jetbrains.annotations.Nullable;
@williewillus
williewillus / primer.md
Last active April 22, 2024 15:29
1.13/1.14 update primer

This primer is licensed under CC0, do whatever you want.

BUT do note that this can be updated, so leave a link here so readers can see the updated information themselves.

1.13 and 1.14 are lumped together in this doc, you're on your own if you just want to go to 1.13 and not 1.14, for some reason.

1.15 stuff: https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e

Things in Advance

  • ResourceLocation now throw on non-snake-case names instead of silently lowercasing for you, so you probably should go and change all those string constants now. More precisely, domains must only contain alphanumeric lowercase, underscore (_), dash (-), or dot (.). Paths have the same restrictions, but can also contain forward slashes (/).
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 20, 2024 07:49 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@Dinnerbone
Dinnerbone / minecraft_commands.txt
Last active September 12, 2023 19:53
Minecraft Java Edition 1.13 changes
advancement grant <targets> everything
advancement grant <targets> from <advancement>
advancement grant <targets> only <advancement>
advancement grant <targets> only <advancement> <criterion>
advancement grant <targets> through <advancement>
advancement grant <targets> until <advancement>
advancement revoke <targets> everything
advancement revoke <targets> from <advancement>
advancement revoke <targets> only <advancement>
advancement revoke <targets> only <advancement> <criterion>
@Birdie0
Birdie0 / ifttt-webhooks-extended-guide.md
Last active March 6, 2024 13:38
How to use Discord Webhooks

⚠️ This gist is no longer updated! For maintained, improved and even more extended guide click here.


How to use Discord Webhook

It's a JSON

First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.

Update: download the new Pokemon Go app - it fixes all of this. Download it, and reauth, and you should be set. The grant scopes and prompt are correct and visible now too! Now if only I could actually find a pikachu...

Pokemon tokens are requested with these understandable scopes:

@matthewprenger
matthewprenger / 01-mapping_update_instructions.txt
Last active December 18, 2019 16:16
Place the new methods.csv and fields.csv in the root of your project (TEMPORARILY, Don't commit these to git!) and add this to the end of your build.gradle and run 'gradle updateMappings`. Updated sources will be placed in src_remapped/main/java. You should do a diff to ensure that they are correct and then replace src/main/java with them.
Important note: Your code must compile on the old mappings, and the obfSourceJar must be enabled (it is by default)
1. Download a copy of the new methods.csv and fields.csv from http://export.mcpbot.bspk.rs/ to the root of your project.
2. Add the following gradle script to your build.gradle.
3. Run 'gradle(w) updateMappings'.
4. Do a diff between src/main/java/ and src_remapped/main/java/ to make sure everything looks right.
5. replace src/main/java/* with src_remapped/main/java/*
@williewillus
williewillus / primer.md
Last active June 15, 2023 03:33
Capabilities: A Primer (tm)

Capabilities

Another award-winning primer by williewillus

Capabilities...a wondrous new system. That you've probably been forced into using. But let's not talk about that and get straight into the learning!

Terms and definitions

  • Capability System - This entire system; what this primer is about. This system is named very literally for what it does.
    • Capability - the quality of being capable; capacity; ability
  • Capable - having power and ability