Skip to content

Instantly share code, notes, and snippets.

@deathcap
deathcap / babel.md
Last active February 17, 2016 07:32
My Big List of Annoyances with Babel/ES6 Transpilation

Complicates development-code distribution: When a user checks out a new revision of the source code from git, the changes won't immediately have any effect, unlike (most) changes from non-transpiled modules. Instead they have to be sure to run npm run-script prepublish to recompile.

Actual user conversation from chatroom (lightly edited for relevance):

developer Jan 24 15:33 update, I fixed that recently
user Jan 24 15:33 ooooohhh, ummm
  the current [module] has that update, or do I need a special fork version from you?
other-developer Jan 24 15:35 It was merged yeah
@jomo
jomo / Minecraft Accounts.md
Last active June 15, 2024 11:39
Tracking down Minecraft account creation

Tracks down when a Minecraft account was created.

How it works

Mojang has an API endpoint for usernames:

https://api.mojang.com/users/profiles/minecraft/<name>?at=<timestamp>

It can be used to find the UUID of an account, by username it used at the given time.
It returns either 200 OK or 204 No Content – indicating that the username was not in use at the time.

@deathcap
deathcap / forge.js
Last active January 18, 2016 23:15 — forked from overjt/forge.js
Server-list-ping feature of Minecraft Forge servers.
var net = require("net");
function makeBuf(server, port) {
var bufSize = 7 + server.length;
var buffer = new Buffer(bufSize);
buffer.writeUInt8(bufSize - 1, 0);
buffer.writeUInt8(0, 1);
buffer.writeUInt8(5, 2);
buffer.writeUInt8(server.length, 3);
@overjt
overjt / forge.js
Created January 14, 2016 19:33
Server-list-ping feature of Minecraft Forge servers.
var net = require("net");
function makeBuf(server, port) {
var bufSize = 7 + server.length;
var buffer = new Buffer(bufSize);
buffer.writeUInt8(bufSize - 1, 0);
buffer.writeUInt8(0, 1);
buffer.writeUInt8(5, 2);
buffer.writeUInt8(server.length, 3);
{
"name": "fish.pufferfish.raw",
"id": 206,
"icon": "fish_raw_puffer_fish",
"use_animation": "eat",
"use_duration": 32,
"max_damage": 0,
"stacked_by_data": true,
"food": {
@timoxley
timoxley / stillInZero.js
Last active February 18, 2016 22:13
find number of packages in still < 1.0.0 according to search cache
var columnify = require('columnify')
var fs = require('fs')
var results = [];
var packages = JSON.parse(fs.readFileSync(process.env.HOME + '/.npm/registry.npmjs.org/-/all/.cache.json'))
var packageNames = Object.keys(packages)
// only count packages with dist-tags + latest
var validPackages = packageNames.filter(function(name) {
var item = packages[name];
return (
@SpaceManiac
SpaceManiac / ParticleTestPlugin.java
Created February 6, 2014 03:26
Testing materials for Bukkit Particles PR
package particletest;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.material.MaterialData;
@aseemk
aseemk / coffeescript-updates.md
Last active December 2, 2017 20:22
CoffeeScript upcoming changes.

CoffeeScript 1.7 is shaping up to be a pretty kick-ass release with significant improvements. Here are the ones I'm most excited about, in order of my own excitement.

Parentheses-free chaining

jashkenas/coffeescript#3263

Years of being wished for, finally granted!

@nsporillo
nsporillo / minechat.js
Last active November 18, 2017 06:16
Decent CLI chat client for minecraft 1.6.4 using minecraft-protocol Uses https://github.com/loopj/commonjs-ansi-colorDoesn't support all colors AFAIK, furthermore it's probably not the most efficient way to handle colored chat. Used buffers to deal with the § character, not sure if this can be done without doing that.
var readline = require('readline');
var color = require("ansi-color").set;
var mc = require('../');
var c = new Buffer("§", "utf-8")
var colors = new Array();
colors[c.toString('utf-8') + '0'] = 'black+white_bg';
colors[c.toString('utf-8') + '1'] = 'white+blue_bg';
colors[c.toString('utf-8') + '2'] = 'green';
colors[c.toString('utf-8') + '3'] = 'blue';
@max-mapper
max-mapper / readme.md
Last active January 28, 2024 18:11
How-to: Write a node module with voxel.js

Writing node modules with voxel.js

This is a short guide that will teach you the workflows that have been figured out by the voxel.js community for writing node modules + sharing them on NPM and Github. It is assumed that you have a basic understanding of JavaScript, github and the command line (if not you can check out an introduction to git and the command line or learn JS basics from JavaScript for Cats)

The voxel-tower repository on github contains all the example code from this guide.

Table of contents