Skip to content

Instantly share code, notes, and snippets.

Packages

lua51-5.1.5_9                  Small, compilable scripting language providing easy access to C code
lua51-lpeg-0.12                Parsing Expression Grammars For Lua
lua51-luafilesystem-1.6.3      Library to access directory structure and file attributes
lua51-luasocket-3.0r1          IPv4 and IPv6 socket support for the Lua language
luajit-2.0.4                   Just-In-Time Compiler for Lua
@pirogoeth
pirogoeth / backup.sh
Created July 15, 2014 15:20
super fabulous backup script
#!/usr/bin/env bash
if [ "${BS_DEBUG}" == "YES" ] ; then
set -x
fi
# this is a configurable backup script that should run on a cron job.
# declares the arrays we'll be using, don't change these
@pirogoeth
pirogoeth / dirlocate.sh
Created November 28, 2012 02:34
locates a directory above the current. used to find project directories in dm. based on lsiden's original.
function dirlocate () {
fDir=$1
sLimit=$2
lDir=""
curdir=`pwd`
while [[ "`pwd`" != "${sLimit}" && "`pwd`" != "/" ]] ; do
if test -e "${fDir}" ; then
cd ${fDir}
lDir=`pwd`
break;
@pirogoeth
pirogoeth / Lines.java
Created October 30, 2012 02:03
A little program I wrote to do my precal homework problems for me.
import java.lang.Math;
import java.util.*;
public class Lines {
public CoordSet first;
public CoordSet second;
public static class CoordSet {
@pirogoeth
pirogoeth / zenstaller.sh
Created August 25, 2012 05:06
I found this while searching my old hard drive.
#!/bin/bash
#zenstaller script for linux - pirogoeth
#copyright 2009-2010 brokendream products
clear
##############################################
# VARIABLES #
@pirogoeth
pirogoeth / SalesWeek.java
Created June 26, 2012 16:58
Second Lesson assignment for an intermediate Java course.
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);
@pirogoeth
pirogoeth / compile.sh
Created June 2, 2012 15:17
compiler script for bukkit projects with upstream support, as well as soon to be downstream support.
#!/usr/bin/env bash
declare -a upstream
# ==============================================================================================================
# configurable options
name="OpenEconomy"
basedir="/home/pirogoeth/OpenEconomy"
incdir="${basedir}/inc"
@pirogoeth
pirogoeth / upstream-processing.sh
Created June 2, 2012 14:17
string processor and array tool for the upstream building feature im about to add to my compile.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 / LockboxSupport.java
Created March 20, 2012 01:36
Attempt to write an algorithm that builds a small bedrock building.
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 / split.py
Created September 28, 2011 01:07
can split big files into smaller chunks easily with markers.
#!/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()