Skip to content

Instantly share code, notes, and snippets.

- Long Videos -
David Eagleman: What is Reality? - https://www.youtube.com/watch?v=RF5WQxhZAIc
Sam Harris: Free Will - https://www.youtube.com/watch?v=pCofmZlC72g
Richard Feynman on Fun to Imagine - https://www.youtube.com/watch?v=4zZbX_9ru9U
Life in a Day - https://www.youtube.com/watch?v=JaFVr_cJJIY
Heroin - https://www.youtube.com/watch?v=ShOp6NToA3E
Gobekli Tepe - https://www.youtube.com/watch?v=eHG9URGDt6s
- Short Videos -
Cleansing Our Perception - https://www.youtube.com/watch?v=kM4ZHfBE-0g
Would you opt for a life with no pain? - https://www.youtube.com/watch?v=XNP1x11Z2Ig
@FilipDev
FilipDev / Main.java
Created July 12, 2015 19:52
Branch System
import java.util.ArrayList;
import java.util.List;
public class Main {
private Branch topBranch;
public static void main(String[] args) {
new Main().process();
}
public final class BalanceFormat {
private final double value;
private final String format;
public BalanceFormat(double value, String format) {
this.value = value;
this.format = "$" + format;
}
public final class BalanceFormat {
private final double value;
private final String format;
public BalanceFormat(double value, String format) {
this.value = value;
this.format = format;
}
@FilipDev
FilipDev / SupportingBlocks.java
Created March 3, 2015 00:16
A method to get the blocks that are currently supporting an entity.
public static List<Block> getSupportingBlocks(Entity entity, double width) {
Location location = entity.getLocation();
location.subtract(0, 1, 0);
List<Block> supportingBlocks = new ArrayList<>();
Block under = location.getBlock();
supportingBlocks.add(under);
Line xLine = new Line(location.getX() - width / 2, location.getX() + width / 2);
Line zLine = new Line(location.getZ() - width / 2, location.getZ() + width / 2);
private EnumMap<LoadPriority, List<Class>> loadPriorityList = new EnumMap<>(LoadPriority.class);
public void generatePriorities() {
for (LoadPriority loadPriority : LoadPriority.values()) {
loadPriorityList.put(loadPriority, new ArrayList<>());
}
}
public void registerManagers() {
loadPriorityList.entrySet().forEach((entry) -> {
String host = "hostname";
int rangeStart = 25562;
int rangeEnd = 25568;
int timeOut = 2000;
ArrayList<Integer> workingPorts = new ArrayList<>();
for (int port = rangeStart; port <= rangeEnd; port++)
{
try