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 / 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!!!');
@xZero707
xZero707 / debian-install-zram.sh
Last active October 21, 2018 20:16
Install zRAM on Debian(8)
#!/bin/bash
#
not_root() {
echo "ERROR: You have to be root to execute this script"
exit 1
}
zram_exists() {
echo "ERROR: /etc/init.d/zram already exists"
@xZero707
xZero707 / git-mv-with-history
Created March 5, 2019 12:18 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@xZero707
xZero707 / foldersize.php
Created August 7, 2019 10:29 — forked from eusonlito/foldersize.php
PHP function to get the folder size including subfolders
<?php
function folderSize ($dir)
{
$size = 0;
foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
$size += is_file($each) ? filesize($each) : folderSize($each);
}
@xZero707
xZero707 / IPB4_Centminmod.conf
Created February 13, 2020 12:49
Invision Power Board v4 Nginx configuration file for use with Centminmod.
# IPB4 Working NGINX site conf file
# Tested on IPB 4.3+ and Centminmod 123.09beta01
# This file is for a FORCED SSL site. Non-SSL requests will be directed to SSL.
# Replace domain.com with your IP address or domain name.
# IPv6 is now included.
# Replace IPv4 and IPv6 with the actual addresses.
# Information gathered from
# Centminmod.com / Information pulled from multiple guides. Thx eva2000!