Skip to content

SgtMuffin Posts

PHP Generate Color in Rainbow

I had to create a script that generated rainbow between 2 to 768 colors in the rainbow. It returns an array that can be referenced. It’s ideal for 5 to 700 results.

// Generate Rainbow Points.
function generatecolorcodes($numberofcolor)
	// Find numbers to pick.
	if ($numberofcolor > 0 && $numberofcolor <= 768)
		$divis = round(768 / $numberofcolor);
		$s = 0;
		while ($s < $numberofcolor)
			$cwheel = $s * $divis;
			if ($cwheel >= 0 && $cwheel < 256)
				$red = 255 - $cwheel;
				$green = 0 + $cwheel;
				$blue = 0;
			if ($cwheel >= 256 && $cwheel < 513)
				$red = 0;
				$green = 255 - ($cwheel - 255);
				$blue = 0 + ($cwheel - 255);
			if ($cwheel >= 513 && $cwheel < 768)
				$red = 0 + ($cwheel - 512);
				$green = 0;
				$blue = 255 - ($cwheel - 512);
			$red = dechex($red);
			$green = dechex($green);
			$blue = dechex($blue);
			if (strlen($blue)<2) {$blue = '0'.$blue;}
			if (strlen($green)<2){$green = '0'.$green;}
			if (strlen($red)<2){$red = '0'.$red;}
			$outarray[$s] = "#" . $red . $green . $blue;
	return $outarray;

Llama Punter Updates

I went through and made some cosmetic updates to Llama Punter (for UT2004) and updated how the feeds look as well as the logo. Check it out at

Join the Discord

In the past few weeks it has been clear that a lot of people want to get back together and play games. On the weekends we have been playing a lot of Assault in UT2004. Join in the discord (Link at and get in on the fun. We’d love to have you there! Right now there is 25 people part of it.

It’s hard to top the feeling.

Today I got the reminder of the wonders of automation. About 2 years ago I rolled out a very powerful system that lets our customers book their appointments online. The website makes it look a lot easier than it took to make it work reliably.

First off, our scheduling system is written using a very old database method (MDB) and it is garbage and will always be garbage. To limit the amount of times we have to talk to it, I built out a caching system that does quick checks every minute and full syncs every 5 minutes. Now we have a copy of the database stored in a much easier to work with format.

Secondly, I had to build an extremely complicated and crazy CPU intensive system that looks at ALL appointments in our system and starts generating all possible open times that we can schedule appointments as well as locations and how much open time each spot would have. I made several code improvements and still it takes about 65 seconds to operate on one a compute node (8 core)

Third, we have latitude and longitude stored in caching tables with the open time cache data so we can triangulate the most efficient times to schedule the appointment. Upon a customer entering their address into the system it will take that information and determine the best results and return a score.

It is hard to top the feeling that you essentially built an employee that is there for your customers 24/7, doing your job and other’s jobs. I feel really euphoric thinking about it, and how quite a few people just today utilized the system.

Self-Service is something I believe should be an option in nearly everything. Customers (no matter the industry) wants the option to do it themselves. Never get rid of customer service options like phone support, however, if you do it right customers will start to utilize the self-service and open up time for your employees to get other work done.

Don’t cheap out on web hosting.

Just heard a horror story of a company who decided to change hosts to their new IT guys and it backfired. It’s not best to trust a small business web hosting company who does not handle web hosting primarily. They may have servers that work but they may not have reliable services like Backups, Backup Power, etc.

Websites are important and many use the hosting account to run their emails too. They did in this case and lost them all. I had them on a service that had backups. The hosts I recommend at this point in time is Dreamhost or Hostgator. I prefer Dreamhost for their free SSL certs (using Let’s Encrypt) plus user isolation incase of security incidents on just one of your sites. If you’re used to using cpanel go with hostgator. Neither will give you 100% uptime but they do their best (much like others I didn’t name) to make sure things are fixed quickly.

Net Neutrality

It’s a shame this is where we are. The FCC is going to be voting to strip Net Neutrality rights. This is not good, and speaking as a person who has set up and manage TONS of servers on different carriers I can tell you this breaks rules that helps keep everyone honest.

While I don’t believe ISPs will be doing tiers in the way people over-react to, I do see legitimate throttling like so…

(These are examples, they are not doing this currently, only theoretical)

Spectrum has their own voice service, to encourage people to use their service they will intentionally starve connections to that service to make their service look better. They could do anything from providing poor routing, not upgrading where needed to handle the load or just having a lot of packet loss making the phone call sound terrible.

AT&T offers DirecTV Now and U-Verse service. They could slow down or not give proper bandwidth to services like Sling TV, PlayStation Vue, Hulu TV, etc. This would make their services look better by giving the illusion that a service is worse when it really wasn’t the producing company’s fault.

Verizon has a NFL deal and if you were trying to watch NFL on their network from a different legit source they could slow you down or just not provide reliable service so you would get a bad feeling about what you’re paying for and dump it for verizon’s.

In the past things like this has happened, and it would make a triumphant return if their lobbyists get their way.

This should not be a divided issue. There is literally no benefit to the customers, only the freedom for the companies to do what they do best… Try to get all the money they can from us pathetic chumps. From what I have seen our current government is not remotely listening to the people at this time, they are setting up their friends and other wealthy donors with the bonuses that they really want. We have to do what we can, call your politicians… It’s pretty much all we can do. Get more information here.

Fraghouse Nations server is back up for the holidays

One of the game servers I set up a decade ago is back for the winter. Updated with TitanRPG for better leveling. Fraghouse Nations is a group of custom mods that weren’t necessarily designed to work together all into one unique experience. It uses standard invasion but with a lot more monsters and on custom maps designed for this mode. There are customized Vehicles, Weapons, Maps, Monsters, and more?! The leveling is set up so you can get to a point where it’s relatively easy within about 45 minutes.

You can find this server under the Assault Tab where you will find the other legacy PWC-Gaming servers.

UT2004 Files Sorted a Bit

Thanks for a fan (GoPostal) I thought it was finally time to go through some of the archives of stuff I have for Unreal Tournament 2004. One of the things I double checked was the LAN Party in a box server for UT2004. As it stood it was functional but when I set it up it was configured to a redirect server I hosted that was not active anymore. Since I have the hosting ability I put the files back up on there, so the server will function 100% out of the box.

I also uploaded to the additional files area the Game Mode Override feature, which is quite helpful if you have a lot of servers but want them to appear all in the same game mode list. That’s what I originally set it up for is to allow our invasion server and freon servers to appear under assault along with all the other servers we had. It’s easy to set up and no bull to configure, just add the mutator and it will tell the master server you’re running that mode no matter what you’re doing.

An update on my life.

I have had a few people reach out since me stepping away from DCTV. Since things are slowing down a bit I thought I would update and let you guys know how things are going.

The overall decision was one I needed to make to keep my sanity. Did I “throw away” a lot of effort and labor? I guess. Do I regret it? No. The entire idea of how twitch has really taken over (and may I say doing well) and for me to continue running a site that at the core was primarily a CDN and then a streaming point.

My professional career has been changing a lot and I am happy with where I am there. For many years I have debated that working with family held me back from really achieving success in life. I am happy I waited and did not quit because our business is turning around. The features I have been working on have been really neat, and the public is taking notice of how easy I make it to do business with our company.

I have been waking up early and going to bed early. It’s not so bad once you’re used to it, but honestly still never thought I would be that guy. I have been spending my free time occasionally playing some games and just watching TV. When I get home from a mentally exhausting day the last thing I want to do is work on more things.

In the future I have been toying with doing an audio podcast but really not sure on that. It’s all in limbo! Rest assured though, I am happy. I am relaxed. I have a huge pile of stress off of my head when I don’t have to worry about managing all the services required to keep DCTV v2 alive.