Skip to content

Instantly share code, notes, and snippets.

View SMKH-PRO's full-sized avatar
🏠
Working from home

KASHAN HAIDER SMKH-PRO

🏠
Working from home
View GitHub Profile
@SMKH-PRO
SMKH-PRO / Readme.md
Last active May 27, 2026 12:48
Instagram Smart Unfollow Script — Dev-Aware, Activity-Checked

Instagram Smart Unfollow Script — Category-Aware, Activity-Checked (2025)

This script helps you clean up your Instagram following list directly from the browser console — no third-party apps, no extensions, no API keys. It works by fetching your full following and followers lists using Instagram's internal REST API, compares the two to find accounts that don't follow you back, and then intelligently decides who to unfollow. Rather than blindly unfollowing everyone, it organises accounts into configurable categories (such as dev/coding and motor), fetches each candidate's follower count and last post date in a single API call, and keeps only the top 10 most-followed accounts per category provided they have posted within the category's activity window. Pinned posts are ignored when checking activity so the date reflects genuine recent posting. Accounts that can't be checked due to privacy are skipped to be safe. A persistent localStorage cache means the script can resume exactly where it left off if the brow

@SMKH-PRO
SMKH-PRO / floridaCountyViseCities.json
Created October 29, 2022 18:03
County based cities list of florida USA, Array Object JSON file
{
"Miami-Dade": [
"Miami",
"Hialeah",
"Miami Gardens",
"Miami Beach",
"Kendall",
"Homestead",
"The Hammocks",
"North Miami",
@SMKH-PRO
SMKH-PRO / customTooltip.css
Created June 16, 2022 09:58
custom tooltip with css only.
[title] {
position: relative;
overflow: visible;
}
[title]:hover::after {
content: attr(title);
background-color: black;
padding: 5px 10px;
@SMKH-PRO
SMKH-PRO / readme.md
Last active May 7, 2022 18:24
Coder Byte Stock Picker Challenge in Javascript, Calculate the maximum possible profit in a stock list array.

Stock Picker

https://coderbyte.com/editor/Stock%20Picker:JavaScript

Have the function StockPicker(arr) take the array of numbers stored in arr which will contain integers that represent the amount in dollars that a single stock is worth, and return the maximum profit that could have been made by buying stock on day x and selling stock on day y where y > x. For example: if arr is [44, 30, 24, 32, 35, 30, 40, 38, 15] then your program should return 16 because at index 2 the stock was worth $24 and at index 6 the stock was then worth $40, so if you bought the stock at 24 and sold it at 40, you would have made a profit of $16, which is the maximum profit that could have been made with this list of stock prices.

If there is not profit that could have been made with the stock prices, then your program should return -1. For example: arr is [10, 9, 8, 2] then your program should return -1.

Examples

@SMKH-PRO
SMKH-PRO / ArrayShuffle.js
Created May 3, 2022 10:44
Array shuffle
Array.prototype.shuffle=function() {
return this.sort(() => Math.random() - 0.5);
}
let arr=[1,2,3,4,5,6,7]
arr.shuffle()
console.log(arr)
@SMKH-PRO
SMKH-PRO / permission.bat
Created December 9, 2021 05:48
POD INSTALL PERMISSION DENIED
sudo chown -R $USER ~/Library/Caches/CocoaPods
and
sudo chown -R $USER ~/.cocoapods
@SMKH-PRO
SMKH-PRO / saveJSONonGCP.js
Created October 22, 2021 07:43
Upload Javascript JSON OBJECT to Google Cloud Storage.
const { Storage } = require('@google-cloud/storage')
const storage = new Storage()
const bucket = storage.bucket(bucketName)
const saveJsonFile = (data) => {
const timestamp = new Date().getTime() //unique id
const fileName = `${timestamp}.json`
const file = bucket.file(fileName)
const contents = JSON.stringify(data)
return file.save(contents)
@SMKH-PRO
SMKH-PRO / SplitArrayByObjProperty.js
Last active October 14, 2021 18:01
Split an array of objects into parts based on a property in the object.
var splitArrayObjByProperty = (arr,property) => {
const output = [];
let last = 0;
for (let i = 1; i <= arr.length; i++) {
if (arr[i]?.[property]?.toLowerCase()?.trim() !== arr[i - 1]?.[property]?.toLowerCase()?.trim()) {
output.push(arr.slice(last, i));
last = i;
}
}
return output;
@SMKH-PRO
SMKH-PRO / GoogleCloudBucketDownloadFile.js
Last active September 10, 2021 18:55
Download image from google cloud bucket.
/**--------------------------------------------------------**/
//DOWNLOAD INTO RAM MEMORY:
/**--------------------------------------------------------**/
@SMKH-PRO
SMKH-PRO / convertRemoteFileToDataURL.js
Created August 27, 2021 10:23
code that enables you to convert any remote file to base64 data url with just the URL/File address .
const convertAnyFileToDataURL = (url) => (
new Promise(async (resolve, reject) => {
try {
let blob = await fetchAsBlob(url)
let result = await blobToDataURL(blob)
resolve(result)
} catch (e) {