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
View GitHub Profile
@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()
@Suleman-Elahi
Suleman-Elahi / instaFollow.py
Last active December 29, 2024 13:53
Auto follow Instagram accounts from a list. The list can be a single column CSV file (without header) or a plain text file with usernames to follow in each line. The script follows 12 accounts in less than a minute. But that can customized by adjusting the sleep parameters at line 18 and 24.
from instagram_private_api import Client, ClientCompatPatch
import time
user_name = 'xxxxxxx'
password = 'xxxxxxx'
api = Client(user_name, password)
f = open("followers.csv", "r").read().split("\n")
i = 0
@Suleman-Elahi
Suleman-Elahi / unsaver.py
Last active January 7, 2025 04:06
Sript to unsave all saved Instagram posts. Uses Instagram private API by ping and its extensions to do the heavy lifting.
from instagram_private_api import Client, ClientCompatPatch
from instagram_private_api_extensions import pagination
import json, time
user_name = 'UserName'
password = 'PassWord'
api = Client(user_name, password)
items=[]
@Suleman-Elahi
Suleman-Elahi / reddit.sh
Created March 27, 2019 09:21
Scrape a List of Topics from a Subreddit Using Bash (from HowToGeek)
#!/bin/bash
if [ -z "$1" ]
then
echo "Please specify a subreddit"
exit 1
fi
SUBREDDIT=$1
NOW=$(date +"%m_%d_%y-%H_%M")
OUTPUT_FILE="${SUBREDDIT}_${NOW}.txt"
@Suleman-Elahi
Suleman-Elahi / unicode.py
Created December 17, 2018 09:46
A simple python script to generate unicode characters in a specific range
i=int(input("Enter Lrange: "))
j=int(input("\nEnter Rrange: "))
for x in range(i,j,1):
print (chr(x),end=' ')
@Suleman-Elahi
Suleman-Elahi / understanding-word-vectors.ipynb
Created November 13, 2018 05:51 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Suleman-Elahi
Suleman-Elahi / Stylefile.yml
Created August 2, 2018 04:17
Customizations for www.freewarefiles.com via StyleURL.
---
version: 1.0
domains:
- www.freewarefiles.com
url_patterns:
- www.freewarefiles.com/*
timestamp: '2018-08-02T04:17:41Z'
id: JJaR
redirect_url: https://www.freewarefiles.com/Manager-Desktop-Edition-_program_112372.html
shared_via: StyleURL - (https://styleurl.app) import and export CSS changes from Chrome
@Suleman-Elahi
Suleman-Elahi / MainActivity.java
Created April 12, 2018 04:34 — forked from susanas/AndroidManifest.xml
This is my Quiz App project for the Grow With Google Challenge Scholarship: Android Basics Course
package com.example.android.braquizapp;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestStreamHandler;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.amazonaws.services.s3.model.ObjectMetadata;
import com.amazonaws.services.s3.model.PutObjectRequest;
import com.amazonaws.services.s3.model.PutObjectResult;