Skip to content

Instantly share code, notes, and snippets.

View maxov's full-sized avatar

Max Ovsiankin maxov

View GitHub Profile
public interface Sender {
String getName()
void say(Message message);
}
public interface Reciever {
@maxov
maxov / FormattingJavadocs.md
Last active August 29, 2015 14:10
Fixing formatting errors

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.
@maxov
maxov / treelog-gitconfig
Created November 20, 2014 22:56
Git Log config
# 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 August 29, 2015 14:10
A prototype for an Nbt serialization lib.
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
@maxov
maxov / inventory.java
Last active August 29, 2015 14:10
inventory
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 August 29, 2015 14:10
Just some BS for fun
#!/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)
// simply a marker
interface Carrier {
Inventory getInventory();
}
interface Inventory {
Collection<ItemStack> getItems();
@maxov
maxov / -
Created December 4, 2014 19:55
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));
}
@maxov
maxov / -
Created December 6, 2014 20:53
ack
autoconf
automake
bash
bash-completion
boost
boot2docker
cloc
coreutils
couchdb
interface Registries extends Registry<String, Registry> {
void addChild(Registries child);
}
interface Registry<K, V> {
Set<V> getValues();