Skip to content

Instantly share code, notes, and snippets.

View MuhammadKhizar7's full-sized avatar

Muhammad Khizar MuhammadKhizar7

  • Pakistan
View GitHub Profile
@MuhammadKhizar7
MuhammadKhizar7 / githubAuthcloudflarefn.js
Created May 3, 2022 16:41
cloudflare worder function to auth github
addEventListener('fetch', (event) => {
event.respondWith(handle(event.request))
})
// use secrets
const client_id = CLIENT_ID
const client_secret = CLIENT_SECRET
const redirect_uri = 'https://url.workers.dev'
const scope = 'repo,user'

Pakistan CNIC Number Validator

RegEx for validating CNIC numbers of Pakistan

CNIC stands for Computerized National Identiry Card. There are two ways we can actually write CNIC numbers:

  1. 12345-1234567-1
  2. 1234512345671

One with dashes and one without dashes but not mixed with other.

Only Allow Dashes

@MuhammadKhizar7
MuhammadKhizar7 / Pakistan's Phone Number validation.md
Last active June 17, 2023 17:41
Pakistan's Phone Number validation

Pakistan Mobile Number Validator

RegEx for validating mobile numbers of Pakistan. To change it to work for your country just change 92 and 3 with your country code. Also you can change length of numbers by changing last {9}

^((\+92)?(0092)?(92)?(0)?)(3)([0-9]{9})$/gm

Test it online on RegExr or RegEx101

Explanation:

There are three groups:

Canva Pro Team Invite Link For Free 2023 [100% Working] 👇
https://www.canva.com/brand/join?token=GRui7Uc5Nts4iMxhKxh07A&referrer=team-invite