Skip to content

Instantly share code, notes, and snippets.

View ayoubzulfiqar's full-sized avatar
💫
Engineering

Sensei ayoubzulfiqar

💫
Engineering
  • Freelancer (Open to Collaborations!)
View GitHub Profile
@ayoubzulfiqar
ayoubzulfiqar / prompts.md
Last active August 4, 2025 16:57
The Prompts - Not Comprihensive

Prompts

General Prompts

[
 {
   "act": "An Ethereum Developer",
   "prompt": "Imagine you are an experienced Ethereum developer tasked with creating a smart contract for a blockchain messenger. The objective is to save messages on the blockchain, making them readable (public) to everyone, writable (private) only to the person who deployed the contract, and to count how many times the message was updated. Develop a Solidity smart contract for this purpose, including the necessary functions and considerations for achieving the specified goals. Please provide the code and any relevant explanations to ensure a clear understanding of the implementation."
 },
 {
@ayoubzulfiqar
ayoubzulfiqar / app.tsx
Last active July 31, 2025 18:06
Need Refining Website for SI.yk
import React, { useState, useEffect, useRef } from 'react';
import { ChevronDown, Twitter, Linkedin, Instagram, Facebook } from 'lucide-react';
// Use this to ensure icons work.
// For the purpose of this self-contained immersive, we'll assume 'lucide-react' is available.
// =============================================================================
// Helper Components (to keep the main App component clean)
// =============================================================================
@ayoubzulfiqar
ayoubzulfiqar / sould.md
Last active July 31, 2025 13:57
ShouldHide and DO at the END

You cannot completely hide files like .tsx source code or JSON responses from users who have access to browser developer tools, but you can make them much harder to access and understand. Here are practical approaches:


1. For TypeScript/TSX Files

A. Build and Bundle Your Code

  • Why: Raw .tsx files exist only during development. In production, they should be compiled to JavaScript and bundled.
  • How:
@ayoubzulfiqar
ayoubzulfiqar / directvideodownload.md
Created July 31, 2025 10:12
Dirct Download Button

Solution 1: Fetch + Blob (Optimized for Streaming)

const handleDownloadClick = useCallback(async (url: string, formatExt: VideoFormat) => {
    const title = videoInfo.title;
    const filename = `${title.replace(/[^a-z0-9\-_ ]/gi, '').replace(/\s+/g, '_') || 'download'}.${formatExt.ext}`;

    try {
        console.log('Starting download for:', filename);
@ayoubzulfiqar
ayoubzulfiqar / SoundEffect.ps1
Created July 11, 2025 07:21
Make Error When Script Run To Error
# Function to play a sound file
function Play-ErrorSound {
param (
[Parameter(Mandatory=$true)]
[string]$SoundFilePath
)
# Check if the sound file exists
if (-not (Test-Path $SoundFilePath -PathType Leaf)) {
Write-Warning "Sound file not found: $SoundFilePath. Cannot play alert."
@ayoubzulfiqar
ayoubzulfiqar / jsonevr.go
Created June 20, 2025 07:30
This is a simple script which host/serve the remote as well as LOCAL json file
package main
import (
"context"
"encoding/json"
"fmt"
"io"
"log"
"net"
"net/http"
@ayoubzulfiqar
ayoubzulfiqar / env.md
Created June 12, 2025 17:56
READ ENV

Put this at the top of the file inside .env

# .env

Function to read the file

encoding = locale.getpreferredencoding()

Golang

package main

import (
	"fmt"
	"time"
)
@ayoubzulfiqar
ayoubzulfiqar / sec.py
Last active June 2, 2025 10:19
SEC:Extraction
import html
import json
import re
from bs4 import BeautifulSoup
path = "file.xml"
@ayoubzulfiqar
ayoubzulfiqar / company_tickers.json
Created May 26, 2025 13:29
Add Three Zeros befor the cik_str
This file has been truncated, but you can view the full file.
{
"0": {
"cik_str": 789019,
"ticker": "MSFT",
"title": "MICROSOFT CORP"
},
"1": {
"cik_str": 1045810,
"ticker": "NVDA",
"title": "NVIDIA CORP"