Skip to content

Instantly share code, notes, and snippets.

View ItsSpyce's full-sized avatar
🔰

Spyce ItsSpyce

🔰
View GitHub Profile
public class BenchWindow : IGameWindow
{
public event PropertyChangedEventHandler PropertyChanged;
public byte Id => 1;
public string TechnicalName => "Workbench";
public short Length => 46;
}
if (string.IsNullOrEmpty(newPassword)){
validation.Add("Please choose a new password.");
}
else if (string.IsNullOrEmpty(confirmPassword)){
validation.Add("Please confirm your password.");
}
else{
// now we know that newPassword and confirmPassword have contents, lets check them.
if (newPassword != confirmPassword){
validation.Add("Your new password and confirmed password do not match.");
var position = new Position();
var val = connection.ReadLong();
position.X = (int) (val >> 38);
if (position.X >= (2 ^ 25)) position.X -= 2 ^ 26;
position.Y = (int) ((val >> 26) & 0xFFF);
if (position.Y >= (2 ^ 11)) position.Y -= 2 ^ 12;
position.Z = (int) (val << 38 >> 38);
if (position.Z >= (2 ^ 25)) position.Z -= 2 ^ 26;
return position;
public void Commit()
{
foreach (var thread in Stack.Select(v => new Thread(() =>
{
using (var writer = File.OpenWrite(Location + "\\" + v.Key + ".vdb"))
{
foreach (
var s in
v.Value.GetType()
.GetProperties()
public static string JsonifyAnon(this object input){
var model = input.ToString().Replace("=", ":");
var builder = new StringBuilder();
string[] keys;
object[] values;
foreach(var word in model.Split(' ')){
if (keys.Length == values) keys.Concat(new [] {String.Format("\"{0}\"", word)});
if (keys.Length >= values) {
@ItsSpyce
ItsSpyce / Extensions
Last active August 29, 2015 14:05
PEOPLE WANT ME TO TYPE QUIETER.
//HOPEFULLY this will allow for you to put something in like "5..10" and have the returning array
//replicate the Ruby method of int..int to get all methods in between. Sadly, the ints will have to be a string variable.
//EX:
//"2..12".GetInts(); will return [3,4,5,6,7,8,9,10,11] while (Gets all ints in between)
//"2...12".GetInts(); will return [2,3,4,5,6,7,8,9,10,11,12]. (Gets all ints in between INCLUDING BARRIERS)
//To be quite honest, the only reason for writing this is so that I can get all numbers in between for the simplicity.
//I'm really just fucking sick of the fact that .NET doesn't have the int implementations and should REALLY
//work on making their shit just work for once. If you see something another language implements, TRY TAKING A FCKING HINT AND
//USE IT TOO.