Judah Wright

A collection of my work

Laravel Options

posted 11 04 2018 in Open Source

For a brief rundown on exactly why this library came into being, you can check out the blog post I wrote about it.

The short version it is an object oriented approach to storing and retrieving general site options. It is as simple as the following:

\Option::set('setting name', 'setting value');
echo \Option::get('setting name', 'default value'); // prints "setting value"

This library comes pre-packaged with a bunch of different drivers for maximum compatibility. If none of the default drivers work for you, you can use your own by implementing a simple interface also included in the library.

You can check it out on both Packagist and GitLab.


posted 7 12 2017 in Open Source

This was a SUPER simple library I wrote that does some simple math and conversions between machine-readable file sizes and human-readable file sizes.

This plugin is used on the Hold This site, as well as a few other smaller projects.

You can do some nifty stuff with it, for example:

echo Bytes::make(512)->add('512B')->pretty; // 1.00kB

You can find more information on it on its GitHub page, as well as on Packagist.

Event Loop

posted 16 03 2018 in Open Source

I found myself needing to create a simple event loop in a case where the React framework would not have worked, so I built my own library.

The idea was to keep it as simple as possible. It does not have all the bells and whistles as React does, but if you need that sort of functionality you should just use that.
You can think of it as an incredibly overly-complicated foreach loop.

It is free and open source, anyone is welcome to use it as they see fit.

Discord HTTP Wrapper

posted 7 12 2017 in Open Source

This is  ground-up custom built library to act as a wrapper for Discords RESTful API.

You can find more information on the project on its GitHub Page, but the short version is it lets your code talk to Discord.

For example:

$Channel = judahantor\DiscordHttpWrapper\Channel::find(1234567890);
$Channel->id; // 1234567890
$Channel->name; // TestChannel
$Channel->guild; // The guild the channel belongs to
$Channel->messages; // The 50 most recent messages in this channel
$Channel->sendMessage("Foo bar baz"); // Sends message, returns the message object