Skip to content

Instantly share code, notes, and snippets.

View inxomnyaa's full-sized avatar
🐺
Working on WolvesFortress MCBE RPG Server

inxomnyaa inxomnyaa

🐺
Working on WolvesFortress MCBE RPG Server
View GitHub Profile
<script>
$(document).ready(function() {
$("#sbmt").click(function() {
var re = /\/ignore\s(.*?)\s/g;
var m;
var shoutmsgvalue=$("#shoutmsg").val();
while ((m = re.exec(shoutmsgvalue)) != null) {
if (m.index === re.lastIndex) {
re.lastIndex++;
}
@inxomnyaa
inxomnyaa / iOS7-style chat balloons.markdown
Created July 16, 2015 13:30
iOS7-style chat balloons
/**
* iMessage-style loader
*/
@keyframes fade {
to { background: rgba(0,0,0,.1); }
}
.progress,
.progress:before,
Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 8192 bytes)
File: /src/pocketmine/utils/Config
Line: 132
Type: E_ERROR
Code:
[123] $extension = explode(".", basename($this->file));
[124] $extension = strtolower(trim(array_pop($extension)));
[125] if(isset(Config::$formats[$extension])){
[126] $this->type = Config::$formats[$extension];
@inxomnyaa
inxomnyaa / TextFormat constant to Color
Created August 27, 2017 19:28
Transforms a TextFormat constant to Color for example for coloring armor
$colorconstant = TextFormat::RED;
list($r, $g, $b) = str_split(ltrim(str_replace('>', '', str_replace('<span style=color:#', '', TextFormat::toHTML(colorconstant))), '#'));
$color = new Color(...array_map('hexdec', [$r . $r, $g . $g, $b . $b]));
@inxomnyaa
inxomnyaa / customui_dynamic_subcommand_overview.php
Created September 12, 2017 23:37
customui dynamic subcommand overview
private function registerUIs(){
$ui = new SimpleForm($this->getDescription()->getPrefix() . TextFormat::DARK_PURPLE . ' Commands', 'These are all ' . $this->getDescription()->getPrefix() . ' commands:');
$namespace = __NAMESPACE__. '\subcommand\\';
print $namespace;
foreach (\get_declared_classes() as $class){
if (strpos($class, $namespace) === 0){
$c = substr($class, strlen($namespace));
$c = str_replace('SubCommand', '', $c);
if (strlen($c) > 0){
Usage:
single:
minecraft://?argument=value
or multiple:
minecraft://?argument=value&argument2=value2
@inxomnyaa
inxomnyaa / PHPFunctionToMySQLQuery.php
Created January 24, 2018 15:34
Executes INSERT INTO, UPDATE, SELECT *, DELETE FROM WHERE with values of keys and DELETE FROM WHERE condition on databases using functions to auto-generate the query
/** @var \mysqli $db */
private $db;
/** @var array */
private $settings;
private $tablename = "";
private $fieldarray = [];
public function __construct($settings = []){
@inxomnyaa
inxomnyaa / poggit-dark.css
Last active May 20, 2020 03:37
Poggit dark userstyle - Load it via custom css extension i.e. https://github.com/openstyles/stylus
/* ==UserStyle==
@name Poggit Dark
@version 1.0.6
@description Dark theme for Poggit, a GitHub application for managing PocketMine-family plugins, and website for sharing plugins
@namespace XenialDan
@author XenialDan
@homepageURL https://gist.github.com/thebigsmileXD/ed07c6bd4285614d2c5654c9dce76bf2
@supportURL https://gist.github.com/thebigsmileXD/ed07c6bd4285614d2c5654c9dce76bf2
@updateURL https://raw.githubusercontent.com/StylishThemes/StackOverflow-Dark/master/stackoverflow-dark.user.css
==/UserStyle== */