Skip to content

Instantly share code, notes, and snippets.

View codebucketdev's full-sized avatar

Codebucket codebucketdev

View GitHub Profile
<?php
use CoverArtArchive\CoverArt;
use Guzzle\Http\Client;
use MusicBrainz\Filters\RecordingFilter;
use MusicBrainz\HttpAdapters\GuzzleHttpAdapter;
use MusicBrainz\MusicBrainz;
use phpFastCache\CacheManager;
use Ramsey\Uuid\Uuid;

Keybase proof

I hereby claim:

  • I am codebucketdev on github.
  • I am codebucketdev (https://keybase.io/codebucketdev) on keybase.
  • I have a public key whose fingerprint is 6ACF 5509 C078 97ED 33A3 21D0 9220 5AB9 7461 4068

To claim this, I am signing this object:

@codebucketdev
codebucketdev / snow.js
Created December 18, 2015 19:42
Adds some snowflakes on your website 😄
setInterval(function(){
var documentHeight = $(document).height();
var startPositionLeft = Math.random() * $(document).width() - 100;
var startOpacity = 0.5 + Math.random();
var endPositionTop = documentHeight - 50;
var endPositionLeft = startPositionLeft - 100 + Math.random() * 200;
var durationFall = documentHeight * 10 + Math.random() * 5000;
var animationFlake = endPositionLeft > startPositionLeft ? 'clockwise' : 'counterclockwise';
@codebucketdev
codebucketdev / string2int.cpp
Last active October 19, 2015 14:22
This snippet parses an int32 from a string.
#include <cstdio>
#include <cstring>
using namespace std;
int multiplier(int n)
{
if (n == 0)
return 1;
int q = 10;
package net.crunkle.membrane;
import net.minecraft.server.v1_7_R4.EntityPlayer;
import net.minecraft.server.v1_7_R4.EnumChatVisibility;
import net.minecraft.server.v1_7_R4.TileEntity;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import net.minecraft.util.com.mojang.authlib.properties.Property;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Player;
package net.darkseraphim.test;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.EnumWrappers;
import com.comphenix.protocol.wrappers.PlayerInfoData;
import com.comphenix.protocol.wrappers.WrappedGameProfile;
@codebucketdev
codebucketdev / Font.java
Created May 24, 2015 15:47
Modified Font.java from PixEngine made by Majoolwip
package org.j2game.graphics;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
import java.awt.image.BufferedImage;
import java.io.File;
@codebucketdev
codebucketdev / FontCreator.java
Last active February 14, 2024 06:56
Font Creator for j2game/PixEngine, made for Majoolwip.
package org.j2game.editor;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
@codebucketdev
codebucketdev / login.php
Last active August 29, 2015 14:18
This is an example of a login page using the Yggdrasil Authentification of the Public API from Razex.de
<?php
if(isset($_POST['signin'])) {
$username = filter_var($_POST['username']); $password = filter_var($_POST['password']);
$ch = curl_init("https://api.razex.de/user/login");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, array("username" => $username, "password" => $password));
curl_setopt($ch, CURLOPT_USERAGENT, "Minecraft");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
@codebucketdev
codebucketdev / GameProfileBuilder.java
Created April 7, 2015 08:51
This is an example of my GameProfile Builder in Java using the Public API from Razex.de
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;