Skip to content

Instantly share code, notes, and snippets.

Stanislav Ganev Arxero

View GitHub Profile
@Arxero
Arxero / mysql or maria db charset.sql
Created Jul 30, 2020
FIX for Error Code: 1366. Incorrect string value: '\xF0\x9F\x98\x98' for column
View mysql or maria db charset.sql
Info > https://stackoverflow.com/questions/8906813/how-to-change-the-default-charset-of-a-mysql-table
SELECT * FROM `gw-local-2`.posts;
SET character_set_system = utf8mb4;
UPDATE `gw-local-2`.posts SET content = '😘 asd' where id='9552a88e-cd97-4130-8daa-d0bb48977ebc';
SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
/* The actual fix */
ALTER TABLE `gw-local-2`.posts
View mdbans_script.php
<!doctype html>
<head>
<title>Banlist</title>
<style type="text/css">
body {
background-color: #111111;
width: 100%;
margin: 0px auto;
}
@Arxero
Arxero / chat_logger_v2.1a_php_script.php
Last active Mar 29, 2020
Chat Logger v2.1a PHP Script | Awesome Cars + Fun Maps
View chat_logger_v2.1a_php_script.php
<!doctype html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<title>Chat</title>
<style type="text/css">
body {
@Arxero
Arxero / typescript.json
Created May 13, 2019
Maverick's TypeScript Snippets
View typescript.json
{
/*
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
@Arxero
Arxero / javascript.json
Created Apr 22, 2019
Maverick's JavaScript snippets
View javascript.json
{
/*
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
View 04oddAndEvenSum.js
function solution(input) {
input = input.toString().split('').map(x => +x)
let evenNumbers = input.filter((x) => x % 2 == 0)
let oddNumbers = input.filter((x) => x % 2 != 0)
let evenSum = evenNumbers.reduce((a, b) => a + b)
let oddSum = oddNumbers.reduce((a, b) => a + b)
console.log(`Odd sum = ${oddSum}, Even sum = ${evenSum}`)
}
View 09. Tseam Account.js
function solution(input) {
let games = input[0].split(' ')
for (let i = 1; i < input.length; i++) {
let inputLine = input[i].split(' ')
let command = inputLine[0]
let game = inputLine[1]
let expansion = ''
if (command == 'Expansion') {
View 01. Sort Numbers - JavaScript.js
function solution(n1, n2, n3) {
let result = ''
let numarray = [n1, n2, n3].sort((a, b) => b - a).forEach(x => {
result += x + '\n'
})
console.log(result)
}
View 01. Sort Numbers - JavaScript.js
function solution(n1, n2, n3) {
if (n1 > n2 && n1 > n3) {
console.log(n1)
if (n2 > n3) {
console.log(n2)
console.log(n3)
} else {
console.log(n3)
console.log(n2)
}
View RealSnow_AMXX_XMas2015 without blue fog | ny_snow.amxx without blue fog
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#define PLUGIN "Snow"
#define VERSION "0.6"
#define AUTHOR "Mistrick / edit LAWLIET / Nickron"
#define get_bit(%1,%2) (%1 & (1 << (%2 & MAXCLIENTS-1)))
#define set_bit(%1,%2) (%1 |= (1 << (%2 & MAXCLIENTS-1)))
You can’t perform that action at this time.