Skip to content

Instantly share code, notes, and snippets.

View rehannali's full-sized avatar
🏠
Working from home

Rehan Ali rehannali

🏠
Working from home
View GitHub Profile
@rehannali
rehannali / IntelIJTrialReset.bat
Last active April 8, 2021 10:46
How to Reset InteIIiJ IDEA Evaluation Key in Windows
@echo off
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%APPDATA%\JetBrains\%%I*") do (
rd /s /q "%%a/eval"
del /q "%%a\options\other.xml"
)
)
reg delete "HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\jetbrains\phpstorm\edca4a4e" /f
@rehannali
rehannali / meld-config-sourcetree.txt
Last active August 23, 2019 10:36
Meld configuration with SourceTree
Install Meld > Add it to SystemPath where Meld.exe is located.
SourceTree > Tools > Options > Diff > Diff(Custom > Meld.exe) & Merge(Custom > Meld.exe)
Arguements:
Diff: $LOCAL $REMOTE
Merge: $LOCAL $BASE $REMOTE --auto-merge --output=$MERGED
If you got DLL Issue :
Copy "C:\Program Files (x86)\Meld\lib\libgirepository-1.0-1.dll" to "C:\Program Files (x86)\Meld\libgirepository-1.0-1.dll".
@rehannali
rehannali / proxifier_3_28_trial_reset.bat
Created November 19, 2019 13:35
Proxifier 3.28 trial reset
REM Initex Software Proxifier 3.28 trial reset
REM Close Proxifier if it is running
taskkill /f /im Proxifier.exe
REM If you're using portable edition - delete "DefaultWANProfile" line in "Settings.ini" file in Proxifier PE folder too
reg delete "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main" /v DefaultWANProfile /f
reg delete "HKCU\Software\Initex\Proxifier\Settings" /v DefaultWANProfile /f
@rehannali
rehannali / trial-reset.py
Last active November 3, 2023 08:43
Trial Reseter for MAC
import os
from pathlib import Path
from sys import argv
class ResetTrial:
path = str(Path().home()) + "/Library/"
file_array = []
dir_array = []
@rehannali
rehannali / extract_categories.py
Created December 21, 2019 18:38
Get categories from Jackett index
from bs4 import BeautifulSoup
with open("/Users/rehan/Documents/iOS Projects/Developers Clan/abc.html", "r") as file:
html_doc = file.read()
categories_arr = []
html_parser = BeautifulSoup(html_doc, "lxml")
all_td_tags = html_parser.find_all("td")
@rehannali
rehannali / Delegation.swift
Created July 8, 2020 08:24
A simple solution for [weak self] or [unowned self] dance. No need to worry about retain cycles.
struct Delegation<Input, Output> {
private(set) var callback: ((Input) -> Output?)?
mutating func delegate<Target: AnyObject>(to target: Target, _ callback: @escaping (Target, Input) -> Output) {
self.callback = { [weak target] (input) in
guard let target = target else {
return nil
}
return callback(target, input)
}
@rehannali
rehannali / build-universal-framework.sh
Created June 25, 2021 15:40
Universal Framework depends on Cocoapods
#!/bin/sh
# Make sure to run this script in Framework folder to work properly.
# Create universal-framework.sh and copy all content to it.
# Provide FRAMEWORK_NAME to start build
# Globals Variables
# Avilable Platforms/Architectures
# macosx | iphoneos | iphonesimulator | appletvos | appletvsimulator | watchos | watchsimulator
@rehannali
rehannali / build-universal-xcframework.sh
Created June 25, 2021 15:41
Universal Framework for xcframework
#!/bin/sh
# Make sure to run this script in Framework folder to work properly.
# Create universal-framework.sh and copy all content to it.
# Provide FRAMEWORK_NAME to start build
# Globals Variables
# Avilable Platforms/Architectures
# macosx | iphoneos | iphonesimulator | appletvos | appletvsimulator | watchos | watchsimulator
@rehannali
rehannali / .. MediaCreationTool.bat ..md
Created October 3, 2021 06:23 — forked from AveYo/.. MediaCreationTool.bat ..md
Universal MediaCreationTool wrapper for all MCT Windows 10 versions from 1507 to 21H1 with business (Enterprise) edition support

Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
Preview
A powerful yet simple windows 1X deployment automation tool as well!

awesome gui dialogs to pick windows version and preset action
Auto Setup choice for upgrade directly without prompts, with edition change / intelligent fallback
Create ISO choice for authoring iso file directly via DIR2ISO snippet, including any 'oem' customizations
Create USB choice for authoring usb via native MCT, including any 'oem' customizations (prompts once)
Select in MCT choice for vanilla MCT processing without 'oem' modifications, script quits straightway
control via set script vars, commandline parameters or rename script like iso 21H2 Pro MediaCreationTool.bat

@rehannali
rehannali / supervisord.service
Last active April 21, 2022 14:54 — forked from tonyseek/supervisord.service
Running supervisord with systemd.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
ExecReload=/usr/bin/supervisorctl reload
ExecStop=/usr/bin/supervisorctl shutdown