Skip to content

Instantly share code, notes, and snippets.

View iGoodie's full-sized avatar
🍀
Rocking

Anılcan Metinyurt iGoodie

🍀
Rocking
View GitHub Profile
@ldclakmal
ldclakmal / Stemmer.java
Created January 21, 2018 02:47
Stemmer, implementing the Porter Stemming Algorithm
package DM;
/*
Porter stemmer in Java. The original paper is in
Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
no. 3, pp 130-137,
See also http://www.tartarus.org/~martin/PorterStemmer
@Maqsim
Maqsim / 413-payload-too-large-fix.js
Last active January 21, 2025 12:10
HOW TO FIX "413 Payload too large" in NodeJS (Express)
const express = require('express');
const bodyParser = require('body-parser');
...
// Express 4.0
app.use(bodyParser.json({ limit: '10mb' }));
app.use(bodyParser.urlencoded({ extended: true, limit: '10mb' }));
// Express 3.0
@rambabusaravanan
rambabusaravanan / detect-react-object.js
Created March 12, 2018 07:42
Detect React Objects - Components and Elements
function isClassComponent(component) {
return typeof component === 'function'
&& !!component.prototype.isReactComponent
}
function isFunctionComponent(component) {
return typeof component === 'function'
// && !!String(component).includes('return React.createElement') // may fails
&& React.isValidElement(Component())
}
@alexandrebodin
alexandrebodin / index.js
Created June 6, 2019 13:55
Uploading images to strapi with react and axios
import React, { Component } from 'react';
import axios from 'axios';
import './App.css';
class App extends Component {
constructor() {
super();
this.state = {
images: [],
@anatawa12
anatawa12 / shadowing-and-relocating.gradle.kts
Created March 21, 2021 06:02
the example script to shadow and relocate kotlin for ForgeGradle
import com.anatawa12.javaStabGen.gradle.GenerateJavaStab
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
kotlin("jvm") version "<version>"
id("com.github.johnrengelman.shadow") version "6.1.0"
}
val shade by configurations.creating
configurations.compile.get().extendsFrom(shade)
@SizableShrimp
SizableShrimp / README.md
Last active March 21, 2025 21:36
How to setup shading with Minecraft Forge

How to setup shading with Minecraft Forge

Shading is the concept of packing external dependencies inside your jar so that they exist in production. Without this, using external libraries would produce ClassNotFoundExceptions when you run your mod jar outside of an IDE. This guide explains how to setup shading through Gradle.

Assumptions

This guide assumes that:

  • You are on ForgeGradle 5 or higher
  • You are on Gradle 7.0 or higher