Skip to content

Instantly share code, notes, and snippets.

View xZero707's full-sized avatar
🦆
Absent-Minded professor

Aleksandar Puharic xZero707

🦆
Absent-Minded professor
View GitHub Profile
@xZero707
xZero707 / hhvminfo.php
Last active August 29, 2015 14:17 — forked from ck-on/hhvminfo.php
<?php
/*
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine
Author: _ck_
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements
Version: 0.0.6
* revision history
0.0.6 2014-08-02 display fix for empty vs zero
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@xZero707
xZero707 / Sublime Text 3 Build 3103 License Key - CRACK
Created April 26, 2017 07:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@xZero707
xZero707 / git-detach.sh
Created November 1, 2017 12:16 — forked from larsmans/git-detach.sh
Detach subdirectory from Git repository as separate repo
#!/bin/sh
# Usage: git-detach <directory> <target>
# Creates a new Git repository at <target> from the contents of <directory>
# and its history. Does not remove the directory from its original repo.
#
# E.g.: suppose project/ is a Git repository with a subdirectory lib/, then
# git-detach project/lib/ standalone-lib/
# creates a new repository standalone-lib/ holding the contents of project/lib/
# as a separate repo.
@xZero707
xZero707 / LICENCE SUBLIME TEXT
Created January 23, 2018 15:11
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
@xZero707
xZero707 / keybase.md
Created March 7, 2018 08:38
Keybase Identity Verification

Keybase proof

I hereby claim:

  • I am xzero707 on github.
  • I am xzero707 (https://keybase.io/xzero707) on keybase.
  • I have a public key ASAA5Sg7IqA1pGLf3Utp582WPy4O5T-4tXdm5XZ-0QKd3go

To claim this, I am signing this object:

@xZero707
xZero707 / BinarySearchTreeArray.php
Last active March 26, 2018 09:59
Uses a binary search tree algorithm to locate a value in the specified array.
<?php
/**
* Uses a binary search algorithm to locate a value in the specified array
* Due to internal function call overhead (count, floor), it might be inefficient to use on small arrays
*
* Original:
* @author Nicholas C. Zakas
* @see https://www.htmlgoodies.com/beyond/javascript/how-to-search-a-javascript-string-array-using-a-binary-search.html
*
@xZero707
xZero707 / exceptions-tree.php
Created July 12, 2018 13:43 — forked from mlocati/exceptions-tree.php
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
<?php
/**
* We declare $x as init of anonymous class, which implements magic __toString() method
* @author Alexander Puharic <xzero@elite7hackers.net>
*/
$x = new class
{
/** @var array */
private $feed;
<?php
var_dump(
(empty('' . $x) && ($x == 'FA' && $x == 'LO' && $x == '103' && $x == '208'))
);