Skip to content

Instantly share code, notes, and snippets.

View Suleman-Elahi's full-sized avatar
🏴‍☠️
Working from underground

Suleman Suleman-Elahi

🏴‍☠️
Working from underground
  • Winterhold
View GitHub Profile
@Suleman-Elahi
Suleman-Elahi / main.dart
Created December 5, 2023 11:22
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@Suleman-Elahi
Suleman-Elahi / main.dart
Created December 4, 2023 17:02
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@Suleman-Elahi
Suleman-Elahi / gmail-auto-archive.js
Last active March 3, 2024 21:31 — forked from akamyshanov/gmail-auto-archive.js
GMail Auto Archive script for Google Scripts
function gmailAutoarchive() {
var threads = GmailApp.search("in:inbox label:autoarchive older_than:1d");
Logger.log("found " + threads.length + " threads:");
for(var i = 0; i < threads.length; i++) {
var thread = threads[i];
Logger.log((i+1) + ". " + thread.getFirstMessageSubject());
}
var batch_size = 100;
@Suleman-Elahi
Suleman-Elahi / ytcomments.js
Created September 28, 2023 09:20
Get All YouTube Comments. Paste the code in the snippet after scrolling to the bottom when all the comments have been loaded.
const comments = document.querySelectorAll("yt-formatted-string#content-text");
comments.forEach((comment) => {
const commentText = comment.innerText;
const plainTextComment = commentText.replace(/<[^>]*>/g, "");
console.log(plainTextComment);
});
@Suleman-Elahi
Suleman-Elahi / mxroute_email_accounts.py
Last active April 27, 2024 18:40
A script to bulk create email accounts on MXroute via API. Sleep is not really necessary so can turn off. Use the users.csv file to create the CSV file with information of user to be created, quota must be given in MB. Just replace your username, password, server URL and good to go.
import requests
import csv
import time
server_login = 'YourUserName'
server_pass = 'YourPassword/LoginKey'
endpoint_url = 'AddSevrerURLHereWithPort' + '/CMD_EMAIL_POP' #Change the first part to he URL of the server you recoeved after sign up.
headers={"Content-Type": "application/x-www-form-urlencoded",}
@Suleman-Elahi
Suleman-Elahi / openbox_conf.sh
Last active May 9, 2023 10:13
Install and configure Openbox on newly installed Arch Linux base.
#!/bin/bash
# Install Openbox
pacman -S openbox obconf nitrogen lxappearance --noconfirm
# Install panel and dock, file manager, and terminal
pacman -S tint2 plank pcmanfm xfce4-terminal gedit git --noconfirm
# Install X SERVER
pacman -S --needed xorg-server xorg-xinit --noconfirm
@Suleman-Elahi
Suleman-Elahi / example.json
Last active March 27, 2023 04:58
JSON/LD Schema Markup Code for a Blog. The most optimal piece of JSON/LD code that I have created after researching on various highly ranking blogs and news website.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://example.com/blog-post"
},
"headline": "Optimizing Your Blog for Search Engine Rankings",
"datePublished": "2023-03-23T12:00:00-07:00",
@Suleman-Elahi
Suleman-Elahi / gAdsDownload.py
Created May 28, 2022 07:11
A simple script to get all Google Ads from Google Search results directly. Downloads ad title, link, and description.
from bs4 import BeautifulSoup
import requests, csv
import lxml
from requests.structures import CaseInsensitiveDict
ads = []
key = input("Enter a keyword/domain/brand: ")
headers = CaseInsensitiveDict()
headers["authority"] = "www.google.com"
@Suleman-Elahi
Suleman-Elahi / worker.js
Created March 4, 2022 05:17
Sending Free Emails from Cloudflare Workers using MailChannels Send API. You do not need an account with MailChannels in order to start sending email. You also do not have to verify your domain with Cloudflare.
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
let body = {};
async function handleRequest(request) {
let content = "just drop if it fails...okay ?";
for( var i of request.headers.entries() ) {
content += i[0] + ": " + i[1] + "\n";
}
let respContent = "";
@Suleman-Elahi
Suleman-Elahi / wptags.py
Last active March 23, 2021 07:03
Get All WordPress Tags in Excel (CSV) using WordPress WP API v2
import requests
import csv
import time
from tqdm import tqdm
tags = {}
pages = int(requests.get('https://www.example.com/wp-json/wp/v2/tags').headers['X-WP-TotalPages'])
for i in tqdm(range(pages), ncols=65):
js = requests.get('https://www.example.com/wp-json/wp/v2/tags?page='+str(i+1)).json()