Skip to content

Instantly share code, notes, and snippets.

Sean Johnson pirogoeth

Block or report user

Report or block pirogoeth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pirogoeth
pirogoeth / global.sh
Created Jan 12, 2011
generates a global.tcl file to load eggtcl scripts simply.
View global.sh
#!/usr/bin/env bash
#global.tcl generator
# variables
select_list="Yes No"
if test -e ./global.tcl ; then
echo "Remove global.tcl?"
select choice in $select_list
do
View part of index.php
GNU nano 2.2.4 File: ../index.php
<?
include ('include/header.php');
include ('php/simplepie.inc');
function github_feed () {
$feed = new SimplePie;
$feed->set_feed_url('http://github.com/miyoko.atom');
$feed->enable_cache(true);
@pirogoeth
pirogoeth / Teleport.py
Created May 31, 2011
Teleport plugin for bravo minecraft server
View Teleport.py
class Teleport(object):
implements(IChatCommand)
def chat_command(self, username, parameters):
p = parse_player(factory, username)
if len(parameters) == 0:
msg = "not enough parameters..."
return (msg,)
else:
View nick_registration.part.py
def drop(msg, args = None):
""" drop a nickname and all registered channels from the database. """
if args is None or len(args.split()) < 1:
msg.notice(msg.params, "Syntax: /msg %s \x02DROP\x02 <account> <password>" % (var.bots[msg.params].data['nick']))
return False
if not msg.origin.logged_in or var.users[str(msg.origin)]['account'] == '*':
msg.origin.notice(msg.params, "You are not currently logged in.")
return False
try:
@pirogoeth
pirogoeth / memoize.py
Created Jun 18, 2011
labere's memoizer
View memoize.py
#!/usr/bin/env python
import var
""" this is labere's internal memoization. im only writing this myself because i didn't want to user someone elses, and im quite bored. """
def memoize(name):
""" silly little decorator to get this done.
accepts a name to use for the dictionary to push/pull results from. """
if not var.memoize.__contains__(name):
@pirogoeth
pirogoeth / split.py
Created Sep 28, 2011
can split big files into smaller chunks easily with markers.
View split.py
#!/usr/bin/env python
import sys
class Splitter(object):
def __init__(self, resource):
self.resource = resource
self.file = open(resource, 'r')
self.contents = self.file.read()
@pirogoeth
pirogoeth / LockboxSupport.java
Created Mar 20, 2012
Attempt to write an algorithm that builds a small bedrock building.
View LockboxSupport.java
package me.maiome.openauth.util;
// bukkit imports
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
// internal imports
import me.maiome.openauth.util.ConfigInventory;
@pirogoeth
pirogoeth / upstream-processing.sh
Created Jun 2, 2012
string processor and array tool for the upstream building feature im about to add to my compile.sh
View upstream-processing.sh
#!/usr/bin/env bash
function checkIfElementIsBlank () {
test ! -z ${1}
}
# quick awk lesson
# ============================================================================================
# when using awk as a splitter, you will do awk '{print $#};', where # is the index number
# 0: entire string AFTER any proceeding formatting
@pirogoeth
pirogoeth / compile.sh
Created Jun 2, 2012
compiler script for bukkit projects with upstream support, as well as soon to be downstream support.
View compile.sh
#!/usr/bin/env bash
declare -a upstream
# ==============================================================================================================
# configurable options
name="OpenEconomy"
basedir="/home/pirogoeth/OpenEconomy"
incdir="${basedir}/inc"
@pirogoeth
pirogoeth / SalesWeek.java
Created Jun 26, 2012
Second Lesson assignment for an intermediate Java course.
View SalesWeek.java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class SalesWeek {
public static Map<Day, ArrayList<Sale>> total_sales_day = new HashMap<Day, ArrayList<Sale>>(7);
You can’t perform that action at this time.