Skip to content

Instantly share code, notes, and snippets.

View AliAryanTech's full-sized avatar
🏠
Working from home

Alι Aryαɴ AliAryanTech

🏠
Working from home
View GitHub Profile
const express = require('express')
const cors = require('cors')
const fs = require('fs-extra')
const crypto = require('crypto')
const { join } = require('path')
const verification = new Map()
const FILE = 'sessions.json'
const sessions = fs.existsSync(FILE) ? fs.readJsonSync(FILE) : {}
@AliAryanTech
AliAryanTech / delete-github-deployments.md
Last active March 17, 2025 17:37
Bash script to automatically fetch, deactivate, and delete all deployments from a GitHub repository

Delete All GitHub Deployments Script

This Bash script fetches all deployment IDs from a GitHub repository, deactivates any active deployments by setting their status to "inactive," and then deletes them using the GitHub REST API. It’s designed for my personal use but can be adapted for any repo.

Prerequisites

  • GitHub Personal Access Token: Must have repo or repo_deployment scope. Generate at github.com/settings/tokens.
  • jq: A command-line JSON processor. Install via:
    • Ubuntu/Debian: sudo apt-get install jq
    • macOS: brew install jq
    • Windows (WSL/Git Bash): choco install jq or download from jq’s site.
@AliAryanTech
AliAryanTech / delete_deployments.py
Created March 17, 2025 09:17 — forked from dedoussis/delete_deployments.py
Delete all deployments of a given GitHub repository
#!/usr/bin/env python3
"""
Clears all deployments from a given repo
Requirements: pip install PyGithub
Usage: GITHUB_ACCESS_TOKEN=${MY_PAT} REPO_NAME=twbs/bootstrap delete_deployments.py
"""
from github import Github
@AliAryanTech
AliAryanTech / ssh-tutorial.md
Created February 22, 2025 11:28 — forked from slowkow/ssh-tutorial.md
ssh to a server without typing your password

How to ssh to a remote server without typing your password

Save yourself a few keystrokes. Follow the steps below:

  1. Run this Bash script on your laptop:

    #!/usr/bin/env bash
    

The hostname of your remote server.

@AliAryanTech
AliAryanTech / ssh-tutorial.md
Created February 22, 2025 11:28 — forked from slowkow/ssh-tutorial.md
ssh to a server without typing your password

How to ssh to a remote server without typing your password

Save yourself a few keystrokes. Follow the steps below:

  1. Run this Bash script on your laptop:

    #!/usr/bin/env bash
    

The hostname of your remote server.

Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
SQL Server 2017
----------------
Enterprise Core - 6GPYM-VHN83-PHDM2-Q9T2R-KBV83
@AliAryanTech
AliAryanTech / windows-keys.md
Created January 21, 2025 14:25 — forked from rvrsh3ll/windows-keys.md
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@AliAryanTech
AliAryanTech / index.js
Created December 22, 2024 20:49 — forked from adrianhorning08/index.js
Scrape Facebook Group
const allContent = []
function createCSV(data, fileName) {
const headers = [
'id',
'email',
'firstName',
'lastName',
'postId',
'postText',
@AliAryanTech
AliAryanTech / axios_download_node10+.ts
Created November 8, 2024 05:26 — forked from csotiriou/axios_download_node10+.ts
Proper way of downloading a large file using NodeJS and Axios (NodeJS 10+)
import * as stream from 'stream';
import { promisify } from 'util';
const finished = promisify(stream.finished);
export async function downloadFile(fileUrl: string, outputLocationPath: string): Promise<any> {
const writer = createWriteStream(outputLocationPath);
return Axios({
method: 'get',
url: fileUrl,
responseType: 'stream',
}).then(async response => {
@AliAryanTech
AliAryanTech / dino.md
Created July 4, 2024 13:53 — forked from JARVIS-AI/dino.md
Chrome Dino game cheats

Hack Google Chrome and Make your Dinosaur Immortal

The game can be hacked pretty easily, making your dinosaur not even flinch at the sight of a cactus.

To hack the game, first go the the error message page where your dinosaur is hanging out.

Go ahead and press the space bar to start the game. Once the game starts, right-click and select Inspect” to open up Chrome DevTools, then select the Console tab.