Skip to content

Instantly share code, notes, and snippets.

View irazasyed's full-sized avatar
🎯
WIP

Irfaq Syed irazasyed

🎯
WIP
View GitHub Profile
@irazasyed
irazasyed / nextjs-static-export.md
Created October 10, 2023 18:10
NextJS Static Export Config

NextJS Static Export Config

next.config.js

{
	output: "export",
	distDir: "dist",
	crossOrigin: "anonymous",
	assetPrefix: ".",
@irazasyed
irazasyed / update.zsh
Created September 27, 2023 05:35
CLI: macOS all in one update command for oh-my-zsh. Let's you run system updates for various tools and their packages including composer, npm, bun, python, ohmyzsh, brew, and more
# ~/.oh-my-zsh/custom/update.zsh
ARROW="→"
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m'
# Run macOS Software Updates, and update Homebrew packages, brew cask updates, composer, bun, npm, and their installed packages
# Update Ruby Gems
@irazasyed
irazasyed / scrapeLinkedinSearch.js
Created September 14, 2023 21:43 — forked from adrianhorning08/scrapeLinkedinSearch.js
Scrape Linkedin Search
async function scrapeLinkedinSearch() {
let allProfiles = [];
let page = 1;
window.scrollTo(0, document.body.scrollHeight);
await new Promise((resolve) => setTimeout(resolve, 500));
// find the button aria-label="Next"
let nextButton = document.querySelector('button[aria-label="Next"]');
const peeps = getProfiles();
allProfiles.push(...peeps);
@irazasyed
irazasyed / apollo.js
Created September 14, 2023 21:42 — forked from adrianhorning08/apollo.js
Apollo Scraper
function clickAccessEmailIfAvailable() {
const tbodys = document.querySelectorAll(
".finder-results-list-panel-content table tbody"
);
for (let i = 0; i < tbodys.length; i++) {
const tbody = tbodys[i];
const buttons = tbody.querySelectorAll("button");
// Create an array to store buttons with text including "Access Email"
const filteredButtons = [];
@irazasyed
irazasyed / zillowScraper.js
Created September 14, 2023 21:40 — forked from adrianhorning08/zillowScraper.js
Zillow Scraper
async function scrollDown() {
const wrapper = document.querySelector("#search-page-list-container");
await new Promise((resolve, reject) => {
var totalHeight = 0;
var distance = 600;
var timer = setInterval(async () => {
var scrollHeightBefore = wrapper.scrollHeight;
wrapper.scrollBy(0, distance);
totalHeight += distance;
@irazasyed
irazasyed / global-cli-tools.md
Last active January 13, 2024 17:48
Global NPM CLI Tools & Brew Packages

Must Have Global CLI Tools & Brew packages on macOS

NPM

@antfu/ni
@builder.io/ai-shell
aicommits
alex
cash-cli
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active May 20, 2024 14:02
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@irazasyed
irazasyed / ArrayToShapeConverter.php
Last active May 17, 2023 18:30
PHP: Array to ArrayShape Converter for PHPDocs
<?php
namespace App\Services;
use ReflectionClass;
use Illuminate\Support\Facades\File;
class ArrayToShapeConverter
{
public function __construct(private string $basePath, private readonly string $namespace)
@irazasyed
irazasyed / README.md
Last active January 22, 2024 06:16
Instructions on How to use Cloudflare Argo Tunnel to Share Laravel Valet Site on macOS and Helper Bash Script

How to use Cloudflare Argo Tunnel to Share Laravel Valet Site on macOS

Set up a tunnel locally

1. Download and install cloudflared

brew install cloudflare/cloudflare/cloudflared
@irazasyed
irazasyed / install.sh
Created February 26, 2023 00:31
WordOps LEMP Stack Installation and Configuration
wget -qO wo wops.cc && sudo bash wo
# Auto completion
source /etc/bash_completion.d/wo_auto.rc
echo -e "alias wo='sudo -E wo'" >> $HOME/.bashrc
source $HOME/.bashrc
# Install stack
wo stack install