Skip to content

Instantly share code, notes, and snippets.

View ayoubzulfiqar's full-sized avatar
👁️‍🗨️
Implementing

Sensei ayoubzulfiqar

👁️‍🗨️
Implementing
  • Freelancer (Open to Collaborations!)
View GitHub Profile
@ayoubzulfiqar
ayoubzulfiqar / ReadENV.md
Created March 22, 2025 05:07
READ ENV - without any package

Read ENV

Golang

func loadEnv() error {
	file, err := os.Open(".env")
	if err != nil {
		fmt.Println("FileError:", err)
 return err
@ayoubzulfiqar
ayoubzulfiqar / user-agents.json
Created March 21, 2025 08:05
UserAgents to Use,
[
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 115Browser/27.0.7.5",
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 115Browser/27.0.6.9",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 115Browser/27.0.6.3",
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/49.0.2623.75 Safari/537.36 115Browser/7.0.0",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 115Browser/24.0.2.2",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 115Browser/25.0.2.1",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 115Browser/25.0.6.5",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0
@ayoubzulfiqar
ayoubzulfiqar / settings.md
Last active December 24, 2024 07:25
VSCode WorkBech JSON Profiles Custom Settings

Custom Profile

Default

{
  "workbench.colorTheme": "Tokyo Night",
  "workbench.colorCustomizations": {
    "editor.background": "#090909",
    "sideBar.background": "#090909",
@ayoubzulfiqar
ayoubzulfiqar / free-database-hosting.md
Created February 15, 2024 09:18 — forked from bmaupin/free-database-hosting.md
Free database hosting
@ayoubzulfiqar
ayoubzulfiqar / advent_of_code_day2.md
Last active December 6, 2023 11:02
Advent of Code Implemented in [Go, TypeScript, Dart]

Advent of Code 2023: Day-2: Cube Conundrum

Code Go

Part -1

func CubeConundrum() int {
	// Open the file named "input.txt". If an error occurs, print the error and return 0.
	file, err := os.Open("input.txt")
	if err != nil {
@ayoubzulfiqar
ayoubzulfiqar / advent_of_code_day1.md
Last active December 5, 2023 12:14
Advent Of Code - Day 1 - Trebuchet (Go, Dart, TypeScript)

Day 1: Trebuchet

Code: Golang

// SumCalibration reads a file named "input.txt", calculates the calibration
// values for each line by combining the first and last digits, and returns
// the sum of all calibration values.
func SumCalibration() (int, error) {
	// Open the file for reading
@ayoubzulfiqar
ayoubzulfiqar / security_analysis.md
Created September 12, 2023 05:53
SECURITY RESOURCES

Awesome-SOC-ops

Just collected useful resources for SOC analysts and SOC analyst candidates.

Table of Contents

@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@ayoubzulfiqar
ayoubzulfiqar / sqflite_on_windows.dart
Last active December 26, 2024 13:40
SQFlite on Windows
// Logic
import 'dart:math';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
class SQLiteHelper {
Database? _database;
Future<Database> get database async {
if (_database != null) {
return _database!;
@ayoubzulfiqar
ayoubzulfiqar / revel_tab_bar.dart
Created August 9, 2023 10:37
This Is Tab but little bit fancy
/// A Widget that displays a Bottom Navigation Bar with smooth animation.
/// It is a wrapper around [BottomNavigationBar]
/// [RevelTabBar] is a widget that displays a horizontal row of tabs, one tab at a time.
/// The tabs are individually titled and, when tapped, switch to that tab.
class RevelTabBar extends StatelessWidget {
RevelTabBar({
Key? key,
this.selectedIndex = 0,
this.height = 60,