Skip to content

Instantly share code, notes, and snippets.

View mkotb's full-sized avatar

Mazen mkotb

  • Vancouver, BC, Canada.
View GitHub Profile
@mkotb
mkotb / Modified SMTP by IvyBits
Last active August 29, 2015 14:01 — forked from GermanCoding/Modified SMTP (v.1.4) by IvyBits.java
Fixed indentation and syntax
package com.germancoding.email;
/**
* Copyright (c) 2014 Xiaomao Chen @ IvyBits
* All rights reserved.
*
*(Modified version by GermanCoding)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
@mkotb
mkotb / CacheMap.java
Last active August 29, 2015 14:04
Proper way to cache objects
import java.util.ArrayList;
import org.apache.commons.collections.MapIterator;
import org.apache.commons.collections.map.LRUMap;
public class CacheMap<K, V> {
private long timeToLive;
private LRUMap cacheMap;
public CacheMap(long timeToLive, final long timerInterval, int maxItems) {
@mkotb
mkotb / uploader.php
Created July 20, 2014 02:35
PHP Script
<?php
// Path at-which you want to store your images in
$path = '/home/mazentheamazin/public_html/';
// The URI path at which images will be accessed (change as necessary).
$uri = 'http://' . $_SERVER['HTTP_HOST'] . '/';
if ($_FILES["file"]["error"] == UPLOAD_ERR_OK) {
$tmp_name = $_FILES["file"]["tmp_name"];
@mkotb
mkotb / gist:70d7547599f72e84d5b3
Created July 20, 2014 22:57
Fuck. reflections.
for(Class<?> cls : new Reflections("io.mazenmc.notifier.listeners.bukkit").getSubTypesOf(Object.class)) {
getServer().getPluginManager().registerEvents((Listener) cls.newInstance(), plugin);
log(cls.getSimpleName());
}
for(Class<?> cls : new Reflections("io.mazenmc.notifier.listeners.notifier").getSubTypesOf(Object.class)) {
getEventHandler().registerListener((NotifierListener) cls.newInstance());
log(cls.getSimpleName());
}
@mkotb
mkotb / NameTable.md
Last active January 2, 2021 00:24
NameTable
Skype Name Name on Bukkit Name IRL
heycallmethemezand mazentheamazin Mazen
troll.dude.3 xTrollxDudex Not Given
live:noobhelper KingFaris11 Faris
live:business_faris KingFaris11 Faris
mattrick16 mattrick Matthew
dryman11 (lol) Quantum64 Dylan
pippintook11 calebbfmv Tim
vilsol Vilsol Not Given
[2:15:14 PM] Mazen: not really nsfw
[2:15:15 PM] Mazen: thats still sfw
[2:15:21 PM] Mazen: technically
[2:15:23 PM] Mazen: in some work places
[2:15:37 PM] zombiekiller753: ...
[2:15:38 PM] Mazen: Well, pornhub has a workplace...
[2:15:38 PM] zombiekiller753: yea
[2:15:39 PM] Mazen: So then again
[2:15:41 PM] Kailan Blanks | Komp: If you work at pornhub, nothing is NSFW
[2:15:43 PM] zombiekiller753: I WAS GONNA SAWY THAT

Keybase proof

I hereby claim:

  • I am mazenmc on github.
  • I am mazenmc (https://keybase.io/mazenmc) on keybase.
  • I have a public key whose fingerprint is 514A 5531 25F1 3CF1 5F95 5135 CB95 1EB4 3A48 AE5A

To claim this, I am signing this object:

@mkotb
mkotb / SimpleScoreboard.java
Last active December 24, 2022 02:29
Non-flickering scoreboard implementation; create scoreboards with ease.
import com.google.common.base.Charsets;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.*;
import java.lang.reflect.Constructor;
@mkotb
mkotb / skype-override.css
Last active August 29, 2015 14:21
CSS to make Microsoft's Skype Client less of a sidebar and more of an actual client
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("mail.live.com") {
.sidebar {
border-left-color: #CCC;
background-color: #F3F3F3;
width: 1720px;
position: fixed;
right: -300px;
bottom: 0px;
@mkotb
mkotb / hof.txt
Last active March 9, 2016 14:20
Mazen's Skype Chat -- Hall of Fame
[2016-01-30, 4:34:59 PM] Mazen: @whatwouldhappen if Mazen was a homophobe
[2016-01-30, 4:35:00 PM] Mazen's Bot: (Mazen) if Mazen was a homophobe, Vemacs would come out of the closet
[2016-01-30, 4:51:51 PM] Mazen: @whatwouldhappen if Gilles was a hardcore feminist furry
[2016-01-30, 4:51:52 PM] Mazen's Bot: (Mazen) if Gilles was a hardcore feminist furry, Boet would lose their virginity
[2016-01-30, 4:53:14 PM] Mazen: @whatwouldhappen if Boet sexually identified as a cat
[2016-01-30, 4:53:14 PM] Mazen's Bot: (Mazen) if Boet sexually identified as a cat, Matthew would rape mattrick with their head
[2016-01-30, 4:53:15 PM] Gilles: oh
[2016-01-30, 4:53:22 PM] Matt: o