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
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
@matthewprenger
matthewprenger / signjars.md
Last active April 21, 2022 20:53
A simple tutorial on setting up jar signing with ForgeGradle 2

Signing Your Jar

Signing your jar can help you and your users verify that the jar they have is an authentic jar created by you. This will help a lot, but is not 100% effective. If someone really wants to get around it, they can.

Creating a keystore

Let's start off by creating a new keystore. A keystore is the private database file that holds the information needed to sign a jar. This command requires a correctly setup Java Development Kit.

keytool -genkey -alias Matthew -keyalg RSA -keysize 2048 -keystore keystore.jks
@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
@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/*

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:

@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.

@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>
@ibraheem4
ibraheem4 / postgres-brew.md
Last active June 16, 2024 04:48 — 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
@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 (/).