Skip to content

Instantly share code, notes, and snippets.

View XHiddenProjects's full-sized avatar

XHiddenProjects XHiddenProjects

View GitHub Profile
@XHiddenProjects
XHiddenProjects / GPS.php
Last active October 15, 2025 16:11
Checks if the user is using a location spoofing
<?php
header("Content-Type: application/json");
include_once 'LocationSpoofer.php';
$currentLat = $_POST['latitude'];
$currentLon = $_POST['longitude'];
// (San Francisco, USA)
$prevLat = 37.7749; //Previous latitude
$prevLon: -122.4194; //Previous longitude
$lastChecked = "2025-10-12 15:00:32"; //Last checked time
$speed = 100; //Highway car
@XHiddenProjects
XHiddenProjects / vtt.js
Created March 25, 2025 23:58
Generates the correct format for WebVTT in js and returns the correct format
/**
* Generate WebVTT text
* @param {[{start: {hrs: number, min: number, sec: number, ms: number}, end: {hrs: number, min: number, sec: number, ms: number}, text: string}]} config
*/
const captions = (config)=>{
let vtt = `WEBVTT`;
const lead = (num)=>{
if(num<10) return `0${num}`;
else return num;
@XHiddenProjects
XHiddenProjects / Operations.mar
Last active February 22, 2025 12:38
This is a basic look at Mathematics operations using MARIE Assembly Language. You can try it out at https://marie.js.org/
org 000
OPInit, Clear
Input
Store X
Store DX
Input
Store Y
Jump OPADD
// Add
OPADD, LOAD X
@XHiddenProjects
XHiddenProjects / TOH.java
Last active February 21, 2025 00:24
Calculates the Towers of Honoi
package TOH;
import java.util.Arrays;
public class TOH {
private int[] disks;
private int[][] pegs;
private int totalSteps = 1;
private boolean displaySteps = false;
@XHiddenProjects
XHiddenProjects / Tree.js
Created January 23, 2025 00:48
JS TreeNodes
var Tree = {
bfs: (obj) => {
const result = [];
const queue = [];
queue.push(obj);
while (queue.length > 0) {
const current = queue.shift();
for (const key in current) {
if (current.hasOwnProperty(key)) {
result.push(key);
@XHiddenProjects
XHiddenProjects / EventJS.js
Last active January 14, 2025 16:38
JS library that makes adding events easier
let EventJSReturns = [{
'label': 'element',
'event': 'target',
'output': 'object',
'allies': []
},
{
'label': 'curX',
'event': 'clientX',
'output': 'number',
{"AL":"Alabama","AK":"Alaska","AZ":"Arizona","AR":"Arkansas","CA":"California","CO":"Colorado","CT":"Connecticut","DE":"Delaware","FL":"Florida","GA":"Georgia","HI":"Hawaii","ID":"Idaho","IL":"Illinois","IN":"Indiana","IA":"Iowa","KS":"Kansas","KY":"Kentucky","LA":"Louisiana","ME":"Maine","MD":"Maryland","MA":"Massachusetts","MI":"Michigan","MN":"Minnesota","MS":"Mississippi","MO":"Missouri","MT":"Montana","NE":"Nebraska","NV":"Nevada","NH":"New Hampshire","NJ":"New Jersey","NM":"New Mexico","NY":"New York","NC":"North Carolina","ND":"North Dakota","OH":"Ohio","OK":"Oklahoma","OR":"Oregon","PA":"Pennsylvania","RI":"Rhode Island","SC":"South Carolina","SD":"South Dakota","TN":"Tennessee","TX":"Texas","UT":"Utah","VT":"Vermont","VA":"Virginia","WA":"Washington","WV":"West Virginia","WI":"Wisconsin","WY":"Wyoming"}
@XHiddenProjects
XHiddenProjects / TimeFormat.min.js
Created September 25, 2024 22:26
TimeFormatJS
export class TimeFormat{#t;#e;constructor(t){if(!t||!t.match(/([\d]{1,2})-([\d]{1,2})-([\d]{1,2})( |t)([\d]{1,2}):([\d]{1,2})(:([\d]{1,2}))?/))throw new Error("Invalid timestamp: Must be YYYY-mm-dd HH:ii(:ss)?");this.ts=t,this.#t=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],this.#e=["January","February","March","April","May","June","July","Augest","September","October","November","December"],this.dictionary={d:this.#s(this.ts),D:this.#n(this.ts),j:this.#i(this.ts),l:this.#r(this.ts),N:this.#a(this.ts),S:this.#h(this.ts),w:this.#o(this.ts),z:this.#u(this.ts),W:this.#D(this.ts),F:this.#g(this.ts),m:this.#w(this.ts),M:this.#m(this.ts),n:this.#l(this.ts),t:this.#c(this.ts),L:this.#d(this.ts),o:this.#y(this.ts),X:this.#f(this.ts),x:this.#M(this.ts),Y:this.#T(this.ts),y:this.#p(this.ts),a:this.#S(this.ts),A:this.#F(this.ts),B:this.#Y(this.ts),g:this.#H(this.ts),G:this.#O(this.ts),h:this.#b(this.ts),H:this.#v(this.ts),i:this.#$(this.ts),s:this.#z(this.ts),u:this.#I(this.ts),v:this.#P(this
@XHiddenProjects
XHiddenProjects / img2lnk.js
Created September 3, 2024 19:11
A simple JS file that converts Images to Links, while keeping the image.
/**
* @name Img2Link
* @author XHiddenProjects
* @version 1.0.0
* @description Convert Images to links
* @todo For every <img/> use the "href" to make it into a link and "target" to select target redirect
*/
window.addEventListener("load",(()=>{document.querySelectorAll("img").forEach((e=>{const t=document.createElement("a");t.href=e.getAttribute("href")||"",t.target=e.getAttribute("target")||"",t.innerHTML=e.outerHTML,e.replaceWith(t)}))}));
@XHiddenProjects
XHiddenProjects / SurveyBuilderConfig.js
Created November 19, 2020 00:34
SurveyBuilder Configuration JavaScript Codes
"use strict";
//web Config
var Allow_Banner_display = true; //Allow to display SurveyBuilder footer(banner)
var Allow_Console_attribute = true; //Enables the Console Log
var Allow_Pop_up = false; //Allow alert_box to popup when a user joins
var limit_list = []; //Removes any category on your choice.
var Allow_Inspect_element = true; //Allows users to use the Inspect Element
var Allow_location_tracking = false; //Allows you to know there location.. sends this to the console.
var Allow_API_config = [false, "{url}"]; //Enables a password that works only when a API is enabled. Password will popup when a player joins. type '?api={API}' in URL bar