Skip to content

Instantly share code, notes, and snippets.

@maxov
maxov / FormattingJavadocs.md
Last active Aug 29, 2015
Fixing formatting errors
View FormattingJavadocs.md

Fixing Javadoc Formatting Errors

Problem

I found it necessary to fix some formatting errors. Here are the big types:

/**
 * @param param uncapitalized parameter or with period.
 * @return uncapitalized return or with period.
View treelog-gitconfig
# Kickass graph of all branches
l = "log --pretty=tformat:'%C(yellow)%h%C(auto)%d %C(white)%an %C(reset)%s' --graph --abbrev-commit --decorate --all"
@maxov
maxov / BannerData.java
Last active Aug 29, 2015
A prototype for an Nbt serialization lib.
View BannerData.java
public interface BannerData extends NbtStored {
// If no argument is given, the attribute is saved with the name of the method
@Nbt String id();
// The attributes of this compound tag are collapsed into this NBT data
@Nbt.Collapse Vec3i position();
// Could be replaced with a TextColor, I'm not sure
// 'Base' is set as the name
View inventory.java
Player player;
ItemStack myItemStack = ItemStacks.builder().itemType(ItemType.PLANKS).dataValue(3);
// used by player and crafting table -- has matrix and result
CraftingInventory crafting = player.getInventory().getCraftingInventory();
// the 'input' to the crafting inventory
// it is a grid of items
ItemGrid matrix = crafting.getMatrix();
@maxov
maxov / bs.py
Last active Aug 29, 2015
Just some BS for fun
View bs.py
#!/usr/bin/python
import random
import re
import sys
no_spaces = re.compile('\s')
# many thanks to:
# - my head
# - http://www.tutorialspoint.com/design_pattern/ (gold mine)
View inventory.java
// simply a marker
interface Carrier {
Inventory getInventory();
}
interface Inventory {
Collection<ItemStack> getItems();
View -
body {
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.3), rgba(0,0,0,0.4));
background-image: -moz-linear-gradient(top, rgba(0,0,0,0.3), rgba(0,0,0,0.4));
background-image: -o-linear-gradient(top, rgba(0,0,0,0.3), rgba(0,0,0,0.4));
background-image: -ms-linear-gradient(top, rgba(0,0,0,0.3), rgba(0,0,0,0.4));
background-image: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.4));
}
View -
ack
autoconf
automake
bash
bash-completion
boost
boot2docker
cloc
coreutils
couchdb
View registries.java
interface Registries extends Registry<String, Registry> {
void addChild(Registries child);
}
interface Registry<K, V> {
Set<V> getValues();
View -
{
"Sheep": [
"Animal"
],
"Living": [
"Entity"
],
"Giant": [
"Monster"
],