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 / method_testing.md
Created August 5, 2023 08:14
This is simple Testing and Benchmarking show case which type of class Method is Fast e.g [intance type, static type, private static type]

Method Testing

OddEven Sorting Algorithm for Testing Purpose

void oddEvenSort(List<int> arr, int n) {
  bool isSorted = false;

  while (!isSorted) {
    isSorted = true;
@ayoubzulfiqar
ayoubzulfiqar / oh-my-posh-terminal.md
Last active August 4, 2023 11:02
Oh-My-Posh Terminal Theme - Make Your Terminal Look Amazing

Oh My Posh - Make Your Terminal Look Beautiful

Font

Oh my Posh - Installation

Run this Command in Terminal

@ayoubzulfiqar
ayoubzulfiqar / pseudorandom_number_generators.md
Created July 24, 2023 13:16
The Pseudorandom Number Generators in Go

The Pseudorandom Number Generators in Go

Normal Algorithm

Generating pseudorandom numbers typically involves using algorithms or processes that produce sequences of numbers that appear to be random but are actually determined by a specific formula or seed value. There are various methods for generating pseudorandom numbers, and I'll provide a comprehensive list of some common techniques:

  1. Linear Congruential Generator (LCG): One of the oldest and simplest methods, it generates numbers using a linear congruential equation. The sequence depends on three parameters: modulus, multiplier, and increment.

  2. Mersenne Twister: A widely used pseudorandom number generator that has a very long period and good statistical properties. It uses a large state space and produces high-quality random numbers.

// Extension
extension RandomColorExtension on String {
static const letters = "0123456789abcdefghijklmnopqrstuvwxyz";
static String _randomString() {
final Random random = Random();
String result = '';
for (int i = 0; i < 6; i++) {
@ayoubzulfiqar
ayoubzulfiqar / winrar_password_cracker.go
Last active July 11, 2023 11:32
Simple Scripts to Crack winrar Password
package main
import (
"bufio"
"fmt"
"os"
"os/exec"
"strings"
)
@ayoubzulfiqar
ayoubzulfiqar / coding_challenges.md
Created June 22, 2023 16:17
50+ Coding Challenges for Beginners

Solution

1. Print numbers from 1 to 10

func oneToTen() {
	for i := 1; i <= 10; i++ {
		println("Number:", i)
	}
}
@ayoubzulfiqar
ayoubzulfiqar / algorithm.md
Created June 13, 2023 11:34
The Algorithms List - Coming Soon for Golang
@ayoubzulfiqar
ayoubzulfiqar / CreateFile.ps1
Last active June 10, 2023 10:44
This Script create a new file and turn all the all the words into LowerCase and replace the space with underscore(_)
Param(
[Parameter(Mandatory=$true)]
[string]$FileName
)
# Convert the file name to lowercase
$NewFileName = $FileName.ToLower()
# Replace spaces with underscores
$NewFileName = $NewFileName -replace '\s', '_'
@ayoubzulfiqar
ayoubzulfiqar / CreateFolder.ps1
Created June 10, 2023 10:39
This Script Create a Folder and remove all the Spaces between the Words and turn all prefix letter of Each Word
param (
[Parameter(Mandatory=$true)]
[string]$folderName
)
# Function to capitalize the first letter of each word
function Capitalize-FirstLetter {
param (
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
[string]$string
@ayoubzulfiqar
ayoubzulfiqar / youtube_downloader.md
Created April 27, 2023 08:37
This is simple golang script that download YOUTUBE Videos, Audios, as well as Playlist

YouTube Donwload Playlist

package main

import (
	"fmt"
	"log"

	"github.com/kkdai/youtube/v2"