Skip to content

Instantly share code, notes, and snippets.

View psykzz's full-sized avatar

Matt psykzz

View GitHub Profile
<?
$dayzBeltItems = array(
"ItemCompass"=>"compass",
"ItemEtool"=>"entrenchment tool",
"ItemFlashlight"=>"flashlight",
"ItemGPS"=>"GPS",
"ItemKnife"=>"Knife",
"ItemMap"=>"map",
"ItemMatchbox"=>"matchbox",
"ItemFlashlightRed"=>"Military Flashlight",
<?
$url = "http://api.eve-online.com/Server/ServerStatus.xml.aspx";
$xml = simplexml_load_file(file_get_contents($url));
$serverUp= (bool)$xml->result->serverOpen;
echo ($serverUp)?"Server online :)":"Server offline :(";
<?
error_reporting(E_ALL & ~E_NOTICE);
define("ALE_DIR","./ale/factory.php");
require_once(ALE_DIR);
$keyID = "80085";
$vCode = "GSPEEF4EI8NMSL20UPU1REALLY2THINK3I4WOULD5GIVE6YOU7MY8KEYI1LCMGZ7MUDUD";
$charID = "1365215823";
function sortByDate($a, $b) {
$d1 = new DateTime($a['date']);
$d2 = new DateTime($b['date']);#
@psykzz
psykzz / ClockingSystem.java
Created December 2, 2012 12:10
Clocking system
package userdata;
import java.util.*;
import java.text.*;
public class ClockingIn {
public static void main(String[] args)
{
ClockingIn clockingIn = new ClockingIn();
@psykzz
psykzz / locationName.php
Last active December 11, 2015 08:09
EVE Online - Convert location IDs to the Name counterpart.
<?
$ids = (isset($_REQUEST['ids']))?$_REQUEST['ids']:false;
if(!$ids || $ids=="")
die('API - LocationID to Name conversion, supply comma seperated list of location IDs returns results as json.');
$idList = explode(",", $ids); // Create an array to work with.
array_unique($idList); // Remove duplicates
function sortArray(&$val){$val=intval($val);}
array_walk($idList, "sortArray");
$ids = implode(",", $idList); // Convert back to string list.
$mysqli = new mysqli('localhost', 'user', 'pass', 'dbname');
package com.goon.fleet;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.os.Bundle;
package com.goon.fleet;
import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
def cmd_evedata(self, charName):
# Get character ID and then data.
charID = self.eve_getID(charName)
print "char id is .... %s" % charID
if charID == 0:
self._send_message("- Character ( %s ) Not Found." % charName)
else:
charData = self.eve_getCharData(charID)
self._send_message("- %s" % charData)
return
@psykzz
psykzz / monitor.py
Last active December 17, 2015 00:10
file monitor
import os
import sys
import time
class LogReader():
def __init__(self):
self.defaultPath = os.path.join(os.environ['USERPROFILE'],"Documents","EVE","logs","Gamelogs")
self._fp = None # File Handle
self.lastFile = None
self.open()
@psykzz
psykzz / filecombiner.py
Last active August 29, 2015 13:57
Combining a set of files together ( unfinished )
##
class FileCombiner:
""" File combiner class """
# Mock functions
def _starts(self,a,b):
#print 'start',a,b,a.startswith(b)
return a.startswith(b)
def _ends(self,a,b):
#print 'end',a,b,a.endswith(b)