Skip to content

Instantly share code, notes, and snippets.

View dags-'s full-sized avatar
👀

dags dags-

👀
View GitHub Profile
@Asherslab
Asherslab / Gist.md
Last active June 17, 2018 13:14
Forge Annual Parley
@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 (/).
@lkolbly
lkolbly / GenerateHeightMap.java
Created October 9, 2016 15:23
A sample class to generate Minecraft (Bukkit) terrains, using heightmap-based procedural generation techniques.
package org.rscheme.pillow.island;
import java.util.Random;
import java.util.List;
import java.util.Arrays;
import java.lang.Math;
import com.flowpowered.noise.Noise;
import com.flowpowered.noise.module.Module;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.generator.BlockPopulator;
@daicham
daicham / .gitlab-ci.yml
Last active May 3, 2023 07:05
A sample of .gitlab-ci.yml for a gradle project
image: java:8-jdk
stages:
- build
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
@atrus6
atrus6 / gist:f6a25dfa97a1e2807d0c
Created November 18, 2015 06:01
Complex Planetary Surface in libnoise for java
import libnoiseforjava.NoiseGen;
import libnoiseforjava.module.*;
import libnoiseforjava.util.*;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
public class Terra {
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@jgatjens
jgatjens / direcory_tag.rb
Created February 10, 2014 22:03
jekyll-plugin loop_directory
#usage:
#{% loop_directory directory:images iterator:image filter:*.jpg sort:descending %}
# <img src="{{ image }}" />
#{% endloop_directory %}
module Jekyll
class LoopDirectoryTag < Liquid::Block
include Liquid::StandardFilters
Syntax = /(#{Liquid::QuotedFragment}+)?/
@dconnolly
dconnolly / README.md
Last active March 18, 2024 22:56
All 100 Chromecast background images that are rotated through, linked to their original locations on Google hosting. Links to 2560 width versions, where available.
@Xyene
Xyene / Random.java
Created January 25, 2013 20:35
Faster implementation of java.util.Random.
/**
* A random number generator based on the simple and fast xor-shift pseudo
* random number generator (RNG) specified in:
* Marsaglia, George. (2003). Xorshift RNGs.
* http://www.jstatsoft.org/v08/i14/xorshift.pdf
* Translated from:
* http://www.codeproject.com/Articles/9187/A-fast-equivalent-for-System-Random.
*/
@SuppressWarnings("SuspiciousNameCombination")
public class Random extends java.util.Random {
@jboner
jboner / latency.txt
Last active May 19, 2024 16:30
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