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
| { | |
| "Miami-Dade": [ | |
| "Miami", | |
| "Hialeah", | |
| "Miami Gardens", | |
| "Miami Beach", | |
| "Kendall", | |
| "Homestead", | |
| "The Hammocks", | |
| "North Miami", |
| [title] { | |
| position: relative; | |
| overflow: visible; | |
| } | |
| [title]:hover::after { | |
| content: attr(title); | |
| background-color: black; | |
| padding: 5px 10px; |
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.
| 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) |
| sudo chown -R $USER ~/Library/Caches/CocoaPods | |
| and | |
| sudo chown -R $USER ~/.cocoapods |
| 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) |
| 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; |
| /**--------------------------------------------------------**/ | |
| //DOWNLOAD INTO RAM MEMORY: | |
| /**--------------------------------------------------------**/ | |
| const convertAnyFileToDataURL = (url) => ( | |
| new Promise(async (resolve, reject) => { | |
| try { | |
| let blob = await fetchAsBlob(url) | |
| let result = await blobToDataURL(blob) | |
| resolve(result) | |
| } catch (e) { |