Skip to content

Instantly share code, notes, and snippets.

View manwar's full-sized avatar
✌️
Undercover Contributor

Mohammad Sajid Anwar manwar

✌️
Undercover Contributor
View GitHub Profile
@manwar
manwar / pwc-322.md
Last active May 15, 2025 23:28
The Weekly Challenge - 322

The Weekly Challenge - 322

Early Bird Club members ONLY

Task 1: Format String

Submitted by: Mohammad Sajid Anwar

You are given a string and a positive integer.

Write a script to format the string, removing any dashes, in groups of size given by the integer. The first group can be smaller than the integer but should have at least one character. Groups should be separated by dashes.

@manwar
manwar / pwc-321.md
Last active May 8, 2025 08:40
The Weekly Challenge - 321

The Weekly Challenge - 321

Early Bird Club members ONLY

Task 1: Distinct Average

Submitted by: Mohammad Sajid Anwar

You are given an array of numbers with even length.

Write a script to return the count of distinct average. The average is calculate by removing the minimum and the maximum, then average of the two.

@manwar
manwar / pwc-320.md
Created April 28, 2025 18:50
The Weekly Challenge - 320

The Weekly Challenge - 320

Early Bird Club members ONLY

Task 1: Maximum Count

Submitted by: Mohammad Sajid Anwar

You are given an array of integers.

Write a script to return the maximum between the number of positive and negative integers. Zero is neither positive nor negative.

@manwar
manwar / pwc-319.md
Last active April 22, 2025 10:52
The Weekly Challenge - 319

The Weekly Challenge - 319

Early Bird Club members ONLY

Task 1: Word Count

Submitted by: Mohammad Sajid Anwar

You are given a list of words containing alphabetic characters only.

Write a script to return the count of words either starting with a vowel or ending with a vowel.

@manwar
manwar / verify-checksums.pl
Created April 11, 2025 22:21
Verify CHECKSUMS of given module and optionally version.
#!/usr/bin/env perl
use v5.30;
use Safe;
use JSON;
use LWP::UserAgent;
use Digest::SHA qw(sha256_hex);
our $VERBOSE = 0;
@manwar
manwar / demo.html
Created April 3, 2025 20:10
ChartJS Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Weekly Challenge :: Stats</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
@manwar
manwar / pwc-318.md
Last active April 2, 2025 14:19
The Weekly Challenge - 318

The Weekly Challenge - 318

Early Bird Club members ONLY

Task 1: Group Position

Submitted by: Mohammad Sajid Anwar

You are given a string of lowercase letters.

Write a script to find the position of all groups in the given string. Three or more consecutive letters form a group. Return "" if none found.

@manwar
manwar / pwc-317.md
Last active March 27, 2025 16:51
The Weekly Challenge - 317

The Weekly Challenge - 317

Early Bird Club members ONLY

Task 1: Acronyms

Submitted by: Mohammad Sajid Anwar

You are given an array of words and a word.

Write a script to return true if concatenating the first letter of each word in the given array matches the given word, return false otherwise.

@manwar
manwar / setup-workflow.md
Created March 22, 2025 01:22
Workflow Setup

First we need Personal Access Token (PAT) with workflow permission.

My existing PAT didn't have the permisson to create/update workflows.

So I created a new PAT.

Step 1: Go to your GitHub account settings.
Step 2: Navigate to Developer settings 
Step 3: Personal access tokens 

Step 4: Generate new token.

@manwar
manwar / dir-color.md
Created March 22, 2025 00:11
Change directory color in terminal

Color Codes

30: Black
31: Red
32: Green
33: Yellow
34: Blue
35: Magenta
36: Cyan

37: White