This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The MIT License (MIT) | |
Copyright (c) 2020 Mister_Fix | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* BetterMySQLi.php | |
* | |
* PHP class that allows the usage of some MySQLi functions inline to save space on short queries | |
* @author Mister_Fix <me@misterfix.io> | |
* @package BetterMySQLi | |
* @version v 1.0 | |
* @license MIT License | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class render3DPlayer{ | |
public function __construct($src, $displayHair, $headOnly, $ratio) { | |
$this->playerSkin = $src; | |
$this->head_only = ($headOnly == 'true'); | |
$this->display_hair = ($displayHair != 'false'); | |
$this->ratio = $ratio; | |
} | |
public function get3DRender() { | |
$this->hd_ratio = imagesx($this->playerSkin) / 64; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Access rules cluster, here, we define that squid will only accept connections from within the machine (localhost/127.0.0.1) | |
#Also here we define which IP will be used to make the outgoing request depending on which port the client connected to squid. | |
#We intentionally avoid using Squid's default port (3128) to avoid various port scanning bots discovering our squid instance and trying to use it for various malicious purposes. | |
#This is just an extra safeguard, you should still block all of squid's port from public access via your firewall. | |
#We learned this through the hard way. (https://misterfix.io/i/490823964394917888.png) | |
#Replace these IP's which the IP's assigned to your machine. | |
acl 3129 myportname 3129 src 127.0.0.1 | |
http_access allow 3129 | |
tcp_outgoing_address 1.1.1.1 3129 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Snowflake.php | |
* | |
* Licensed under The MIT License | |
* @author Mister_Fix <me@misterfix.io> | |
* @package Snowflake | |
* @version v 2.0 | |
* @license MIT License | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function flip(&$img) | |
{ | |
$size_x = imagesx($img); | |
$size_y = imagesy($img); | |
$temp = imagecreatetruecolor($size_x, $size_y); | |
$x = imagecopyresampled($temp, $img, 0, 0, ($size_x-1), 0, $size_x, $size_y, 0-$size_x, $size_y); | |
return $temp; | |
} |