Skip to content

Instantly share code, notes, and snippets.

@Rubisk
Rubisk / Free Flow Solver.cpp
Created August 31, 2016 18:12
Solves a Flow Free puzzle!
#include <iostream>
#include <sstream>
#include <forward_list>
#include <list>
#include <vector>
#include <map>
#include <stack>
#include <queue>
@Rubisk
Rubisk / test.py
Created August 29, 2015 11:44
test time
import time
for k in range(10):
t = time.time()
for i, j in zip(range(10000000), range(10000000)):
if(i == j) and (j == 10000000): print 'hi'
print time.time() -t
t = time.time()
for i, j in zip(range(10000000), range(10000000)):
cmake_minimum_required(VERSION 2.8)
## section: Macro
MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
IF(MSVC)
GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
SET(PrecompiledBinary "${CMAKE_CURRENT_BINARY_DIR}/${PrecompiledBasename}.pch")
SET(Sources ${${SourcesVar}})
SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource}
package com.rubisk.colorsignmod;
import java.util.Iterator;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import static org.objectweb.asm.Opcodes.SIPUSH;
@Rubisk
Rubisk / gist:88b1d466dba215ef2e78
Created January 6, 2015 15:46
Chest To Command
from pymclevel import TAG_Compound
from pymclevel import TAG_Int
from pymclevel import TAG_Short
from pymclevel import TAG_Byte
from pymclevel import TAG_String
from pymclevel import TAG_Float
from pymclevel import TAG_Double
from pymclevel import TAG_List
from pymclevel import TileEntity
from pymclevel import nbt
import os
from pymclevel import nbt
filename = os.path.join(level.worldFolder.getFolderPath("data"), "scoreboard.dat")
nbt.load(filename)