Skip to content

Instantly share code, notes, and snippets.

View xSavior-of-God's full-sized avatar
🎮
www.heroxwar.com

xSavior_of_God xSavior-of-God

🎮
www.heroxwar.com
View GitHub Profile
@xSavior-of-God
xSavior-of-God / ldap.php
Last active October 8, 2022 18:24
PHP LDAP parser
<?php
/**
* PHP LDAP parser
*
* --- --- --- --- ---
* Requirements:
* php.ini
* uncomment "extension=ldap"
*
* Library's
@xSavior-of-God
xSavior-of-God / GoogleTranslateTooltip.js
Created February 17, 2022 13:13
Google Translate Extension for Tempermonkey
// ==UserScript==
// @name Google Translate Tooltip
// @namespace steely.wing
// @version 1.10
// @description Translates selected text into a tooltip.
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @copyright 2014, Wing Leong (http://steelywing.iblogger.org/)
// @include *
// @require http://code.jquery.com/jquery-3.6.0.min.js
// @grant GM_getValue
@xSavior-of-God
xSavior-of-God / json_to_table.php
Last active February 7, 2022 12:56
Conversion of JSON to HTML Table, to allow the export of data in Excel format (using JavaScript... after several attempts, with libraries like PHPSpreadsheet and other functions of PHP, I opted for this script in JS) --- PHP
<?php
/*
REQUIRED jquery-3.6.0.min.js
$data is JSON response
-- Custom Requests --
data -> Allow to specify JSON start position, use ";" for more options
Example -> url/?data=data1;1;values => $data["data1"][0]["values"];
noSub -> Hide sub tables
*/
@xSavior-of-God
xSavior-of-God / customKnockback.java
Created January 7, 2021 14:19
Modify the knockback to be given when an explosion occurs
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onTNT(final EntityExplodeEvent e) {
e.setCancelled(true);
/*
* Use e.getEntityType() to handle knocbacks differently for the entity type,
* example if (e.getEntityType() == EntityType.FIREBALL) { // code to change the
* knockback } else if (e.getEntityType() == EntityType.PRIMED_TNT) { // code to
* change the knockback }
*
*/
@xSavior-of-God
xSavior-of-God / subdivisions.json
Last active January 5, 2021 23:23
List of all subdivisions of countries existing in the world (NO Regions!), Updated on 05/01/2021
{
"Subdivisions": [
{
"Country_code": "AD",
"name": "Andorra la Vella",
"code": "07"
},
{
"Country_code": "AD",
"name": "Canillo",
@xSavior-of-God
xSavior-of-God / countries.json
Last active January 5, 2021 23:27
List of all countries name and code, updated on 05/01/2021
{
"Countries": [
{
"name": "Afghanistan",
"code": "AF"
},
{
"name": "Albania",
"code": "AL"
},