Skip to content

Instantly share code, notes, and snippets.

View RoboMWM's full-sized avatar

RoboMWM

View GitHub Profile
@Jikoo
Jikoo / BlockBedCropDupe.java
Last active November 23, 2023 09:27
Block bed placement duplicating crops
package com.github.jikoo.blockbedcropdupe;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
@andreiagmu
andreiagmu / FastPlatformSwitcherSymlink_Windows.cs
Last active June 19, 2024 07:26
Improved FastPlatformSwitcher for Unity 2018 (and maybe other Unity versions), for Asset Database v1 - Symlink version (for Windows systems)
@andreiagmu
andreiagmu / FastPlatformSwitcher.cs
Last active June 19, 2024 07:26
Improved FastPlatformSwitcher for Unity 2018 (and maybe other Unity versions), for Asset Database v1
// Improved FastPlatformSwitcher for Unity 2018 (and maybe other Unity versions)
// For Asset Database v1
// by Andy Miira (Andrei Müller), October 2019
//
// Based on:
// Unity – fast build platform switcher script! (by Aymeric - Da Viking Code)
// https://davikingcode.com/blog/unity-fast-build-platform-switcher-script/
//
// A simple fast platform switcher for Unity (by Waldo Bronchart)
// https://gist.github.com/waldobronchart/b3cb789c028c199e2855
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

/*
* Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.util;
import co.aikar.timings.Timing;
@Thomasvdam
Thomasvdam / soundCloudPlaylist.js
Last active October 9, 2023 18:45
Copy SoundCloud playlist items from one to another.
// Configuration
const WAIT_OPEN_PLAYLIST_POPUP = 1000;
const WAIT_AFTER_ADD_PLAYLIST = 1500;
const TARGET_PLAYLIST_NAME = 'To Do';
// Should the new playlist be in reverse order?
const REVERSE = false;
// Should liked items be skipped?
const SKIP_LIKED = true;
@merikan
merikan / Jenkinsfile
Last active June 13, 2024 03:56
Some Jenkinsfile examples
Some Jenkinsfile examples
public static void setDamage(EntityDamageEvent event, double dmg) {
if (event.getFinalDamage() == 0) {
if (dmg != 0) {
event.setDamage(dmg);
}
return;
}
final double ratio = dmg / event.getFinalDamage();
for (DamageModifier mod : DamageModifier.values()) {
if (event.isApplicable(mod)) {
public static void c(final World world, final BlockPosition blockposition) {
HttpUtilities.a.submit(new Runnable() {
public void run() {
Chunk chunk = world.getChunkAtWorldCoords(blockposition);
for (int i = blockposition.getY() - 1; i >= 0; --i) {
final BlockPosition blockposition1 = new BlockPosition(blockposition.getX(), i, blockposition.getZ());
if (!chunk.c(blockposition1)) {
/*
* Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.util.java;
import com.google.common.base.Supplier;