Skip to content

Instantly share code, notes, and snippets.

View Ifera's full-sized avatar
⏲️
dreamin..

Tayyab R. Ifera

⏲️
dreamin..
View GitHub Profile
@Ifera
Ifera / evaluation-reset.sh
Created November 3, 2023 07:29 — forked from tmsperera/evaluation-reset.sh
JetBrains reset trial evaluation for Linux
for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
echo "Resetting trial period for $product"
echo "removing evaluation key..."
rm -rf ~/.config/$product*/eval
# Above path not working on latest version. Fixed below
rm -rf ~/.config/JetBrains/$product*/eval
echo "removing all evlsprt properties in options.xml..."
@Ifera
Ifera / downloader.php
Created May 4, 2022 10:10 — forked from ARACOOOL/downloader.php
Download remote file with progress bar (PHP, curl)
#!/usr/bin/php
<?php
/**
* Usage:
* php downloader.php http://path.to/remote/file.ext /local/file/path
*
* Output:
* [############################################################################################### ] 96%
*/
@Ifera
Ifera / DeleteTree.php
Last active May 7, 2020 06:20
Delete the a folder and its subfolders recursively
<?php
public static function deleteTree(string $folder, bool $keepRootFolder = false): bool{
// Handle bad arguments.
if(empty($folder) || !file_exists($folder)){
return true; // No such file/folder exists.
}elseif(is_file($folder) || is_link($folder)){
return @unlink($folder); // Delete file/link.
}
// Delete all children.

Keybase proof

I hereby claim:

  • I am jackmd on github.
  • I am jacktaylor (https://keybase.io/jacktaylor) on keybase.
  • I have a public key ASAfS0J1bSpjX3htqCLmjJqny_44mDluz_M-1lbNGgUskAo

To claim this, I am signing this object:

@Ifera
Ifera / rm_r.php
Created October 19, 2019 11:44 — forked from mindplay-dk/rm_r.php
Recursively delete a directory and all of it's contents - USE AT YOUR OWN RISK!
<?php
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use SplFileInfo;
# http://stackoverflow.com/a/3352564/283851
/**
* Recursively delete a directory and all of it's contents - e.g.the equivalent of `rm -r` on the command-line.
@Ifera
Ifera / start.cmd
Last active March 8, 2023 13:40
start.cmd file for PocketMine-MP servers running on windows which supports restarting the server
@echo off
TITLE PocketMine-MP server software for Minecraft: Pocket Edition
cd /d %~dp0
set LOOP=true
set /A LOOPS=0
if exist bin\php\php.exe (
set PHPRC=""
set PHP_BINARY=bin\php\php.exe