Skip to content

Instantly share code, notes, and snippets.

View nsporillo's full-sized avatar
🎯
Focusing

Nick Porillo nsporillo

🎯
Focusing
View GitHub Profile
@nsporillo
nsporillo / dayofblood
Created June 18, 2015 22:33
Day of blood
Lya Solms shook out the last of the laundry with a hearty slap and pegged the trouser legs to the line. Then she tipped the bath of blued water onto the grass, scraped steel wool over the cake of soap and fell to scouring the buckets and basins with short fast strokes.
She kept an eye on the shadows, lengthening at the corner of the water tank. Early this morning, before she came to the farmhouse, she'd put her own washing in to soak and mixed the yeast and flour, rolling it into a ball. It was still to be kneaded.
"White and coloured on the line," she said to herself. Then, in anticipation, "And tough and tender in the pot." A sheep was to be slaughtered later today. In her imagination, she was already stripping the fat from the wether's offal. She could almost smell the roasted crackling of the tail fat.
The sun blazed down on her shoulders. It was a sweltering hot day. The turn of the season sometimes brought such heat that a sulphurous smell rose from the rocks--as if the devil was hauling you once mor
@nsporillo
nsporillo / gist:45a1a5881978e0cdede7
Created June 16, 2015 22:53
Error log should have gone here
7:01:08] [pool-8-thread-2/INFO]: [Buycraft] Loaded 11 package(s) into the cache.
[17:01:08] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to Factions v0.0.7-b55
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) ~[spigot.jar:git-Spigot-c136710-350cb99]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-c136710-350cb99]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-c136710-350cb99]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot.jar:git-Spigot-c136710-350cb99]
at net.minecraft.server.v1_8_R2.PlayerList.onPlayerJoin(PlayerList.java:296) [spigot.jar:git-Spigot-c136710-350cb99]
at net.minecraft.server.v1_8_R2.PlayerList.a(PlayerList.java:156) [spigot.jar:git-Spigot-c136710-350cb99]
at net.minecraft.server.v1_8_R2.LoginListener.b(LoginListener.java:144) [spigot.jar:git-Spigot-c136710-350cb99]
alice = id
bob = not
test = all success tosses
where success (a, b) = alice a == b || bob b == a
tosses = zip toss toss
toss = enumFrom minBound
main = print test
alice = id
bob = not
test = all success tosses
where success (a, b) = alice a == b || bob b == a
tosses = zip toss toss
toss = enumFrom minBound
main = print test
@nsporillo
nsporillo / final.asm
Created May 12, 2015 17:45
final project
##########################################################
# Nick Porillo #
# Final Project: Base2 to Base10 and Base16 converter #
# Description: Input base 2, get the base 10 and base 16 #
##########################################################
# Program logic #
# 1) Run program, enter a base2 string #
# 2) Output will be 1 line with base10, 1 with base 16 #
##########################################################
@nsporillo
nsporillo / error.log
Created April 22, 2015 00:01
Error log
17.04 20:54:01 [Server] INFO ... 13 more
17.04 20:54:01 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[custom.jar:git-Spigot-1.7.9-R0.2-205-g0a049fa]
17.04 20:54:01 [Server] INFO at com.massivecraft.factions.P.onCommand(P.java:197) ~[?:?]
17.04 20:54:01 [Server] INFO at com.massivecraft.factions.P.handleCommand(P.java:185) ~[?:?]
17.04 20:54:01 [Server] INFO at com.massivecraft.factions.zcore.MPlugin.handleCommand(MPlugin.java:259) ~[?:?]
17.04 20:54:01 [Server] INFO at com.massivecraft.factions.zcore.MPlugin.handleCommand(MPlugin.java:296) ~[?:?]
17.04 20:54:01 [Server] INFO at com.massivecraft.factions.zcore.MCommand.execute(MCommand.java:127) ~[?:?]
17.04 20:54:01 [Server] INFO at com.massivecraft.factions.cmd.FCommand.execute(FCommand.java:50) ~[?:?]
17.04 20:54:01 [Server] INFO at com.massivecraft.factions.zcore.MCommand.execute(MCommand.java:109) ~[?:?]
17.04 20:54:01 [Server] INFO at com.massivecraft.factions.cmd.FCommand.execute(FCommand.java:50) ~[?:?]
C:\Users\Nick\My Documents\GitHub\TagEdge>mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethrea
ded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building TagEdge 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://hub.spigotmc.org/nexus/content/groups/public/net/minelink/C
@nsporillo
nsporillo / conf.json
Created April 1, 2015 20:28
Default conf.json file
{
"baseCommandAliases": [
"f"
],
"allowNoSlashCommand": true,
"colorMember": "GREEN",
"colorAlly": "LIGHT_PURPLE",
"colorTruce": "DARK_PURPLE",
"colorNeutral": "WHITE",
"colorEnemy": "RED",
public boolean isOutsideWorldBorder1(FLocation flocation) {
World world = flocation.getWorld();
WorldBorder border = world.getWorldBorder();
Chunk chunk = border.getCenter().getChunk();
// chunkToRegion for the fast divide by 32
int lim = FLocation.chunkToRegion((int) border.getSize());
int diffX = (int) Math.abs(chunk.getX() - flocation.getX());
int diffZ = (int) Math.abs(chunk.getZ() - flocation.getZ());
return diffX > lim || diffZ > lim;
}
@nsporillo
nsporillo / commentkiller
Last active January 23, 2016 00:47
Simple Python script which removes all comments from a source generated from JD-GUI
import os
import fnmatch
import re
pattern = re.compile(r"(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*)")
for root, dirs, files in os.walk("."):
for name in fnmatch.filter(files, "*.java"):
file = os.path.join(root, name)
with open(file, mode='r+') as f: