Skip to content

Instantly share code, notes, and snippets.

View CruzBishop's full-sized avatar

Cruz Bishop CruzBishop

View GitHub Profile
@CruzBishop
CruzBishop / Player.java
Created June 11, 2011 03:32
Permissions for Graham
public class Player extends LivingEntity {
private ArrayList<String> permissions = new ArrayList<String>();
//(Load the permissions, of course. I used Json and Yaml in two projects, but I'm sure you'll have something better)
public boolean hasPermission(string requestedPermission) {
if (permissions.contains("*")) //Is this correct in Java? I think it might be a fragment of C#
return true;
@CruzBishop
CruzBishop / gist:1530742
Created December 29, 2011 00:36
RegEx: Find @Version tags in Java classes
The following has been tested using SublimeText 2 BETA in Ubuntu. It may have to be changed for Windows (remove the | from \r|\n)
[ ]*. @version.*[\r|\n]
@CruzBishop
CruzBishop / Unfetch.bat
Created July 4, 2012 07:07
Unfetch - A small script to delete your prefetch files
@echo off
echo Unfetch - A small script to delete your prefetch files
echo.
echo Author: Cruz Bishop ([email protected])
echo Released into the public domain.
echo.
echo Please note that deleting your prefetch files is not recommended.
echo This may increase your boot and application loading time.
echo Please close this window if you do not want to clear your prefetch.
echo.