Skip to content

Instantly share code, notes, and snippets.

View SupaHam's full-sized avatar

Ali SupaHam

View GitHub Profile
@SupaHam
SupaHam / blocks.json
Last active August 29, 2015 14:19
Minecraft Block registry. Indexed mapColors and materials.
{"mapColors":[{"index":0,"color":0},{"index":1,"color":8368696},{"index":2,"color":16247203},{"index":3,"color":10987431},{"index":4,"color":16711680},{"index":5,"color":10526975},{"index":6,"color":10987431},{"index":7,"color":31744},{"index":8,"color":16777215},{"index":9,"color":10791096},{"index":10,"color":12020271},{"index":11,"color":7368816},{"index":12,"color":4210943},{"index":13,"color":6837042},{"index":14,"color":16776437},{"index":15,"color":14188339},{"index":16,"color":11685080},{"index":17,"color":6724056},{"index":18,"color":15066419},{"index":19,"color":8375321},{"index":20,"color":15892389},{"index":21,"color":5000268},{"index":22,"color":10066329},{"index":23,"color":5013401},{"index":24,"color":8339378},{"index":25,"color":3361970},{"index":26,"color":6704179},{"index":27,"color":6717235},{"index":28,"color":10040115},{"index":29,"color":1644825},{"index":30,"color":16445005},{"index":31,"color":6085589},{"index":32,"color":4882687},{"index":33,"color":55610},{"index":34,"color":1381407}
@SupaHam
SupaHam / blocks.json
Last active August 29, 2015 14:19
Minecraft Block registry. Indexed mapColors and materials. (not minified)
{
"mapColors": [
{
"index": 0,
"color": 0
},
{
"index": 1,
"color": 8368696
},
@SupaHam
SupaHam / deploy.py
Last active August 29, 2015 14:20
Server instance deploying script.
#!/usr/bin/python
import os, sys, yaml, shutil
homeDir = "/home/minecraft/"
serversDir = "/home/minecraft/"
dataDir = homeDir + ".deploy/"
srvTemplate = dataDir + "template"
# FILES
mcProps = "server.properties"
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
2.times do
play 60
sleep 0.7
play 62
sleep 0.7
play 64
sleep 0.7
play 60
sleep 0.8
end

Keybase proof

I hereby claim:

  • I am SupaHam on github.
  • I am supaham (https://keybase.io/supaham) on keybase.
  • I have a public key whose fingerprint is C4F1 BE2F E64C ABBD 43F9 8FBB 10CA 6F8E 9D46 2049

To claim this, I am signing this object:

@SupaHam
SupaHam / Fibonacci.java
Created April 21, 2016 03:49
Very efficient Fibonacci algorithm that caches previous values to save on calculation times
package com.supaham.test;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
public class Fibonacci {
private static Map<BigInteger, BigInteger> fibIndex = new HashMap<>();
private static final BigInteger TWO = BigInteger.valueOf(2);
@file:Suppress("NOTHING_TO_INLINE")
package org.jetbrains.anko
import android.app.Fragment
import android.view.View
/*
* This class must be named Dialogs2 to not override Anko.
*/
@SupaHam
SupaHam / Preferences.sublime-settings
Created June 15, 2016 01:46
My sublime settings on desktop.
// SupaHam (https://github.com/SupaHam)
// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by file type specific settings.
{
"fade_fold_buttons": false,
"translate_tabs_to_spaces": true,
"always_show_minimap_viewport": true,
@SupaHam
SupaHam / JLog.YAML-tmLanguage.yaml
Last active June 19, 2016 01:18
Bukkit .log highlighing. Designed for Solarized (Dark). Preview: http://supa.me/vbqNuW.png
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: JLog
scopeName: text.jlog
fileTypes: [log]
uuid: 0da65be4-5aac-4b6f-8071-1aadb970b8d3
patterns:
- match: '^\[\d{2}:\d{2}:\d{2}\]\s+\[.*\]:'
name: comment.line.number-sign.perl.text.log