Skip to content

Instantly share code, notes, and snippets.

View gunjanpatel's full-sized avatar

Gunjan Patel gunjanpatel

View GitHub Profile
@gunjanpatel
gunjanpatel / countries-phone.md
Created February 27, 2024 13:49
List of almost all countries phone number, min and max length, example and regex validation.

List of almost all countries phone number, min and max length, example and regex validation.

Europe:

Country Minimum Length Maximum Length Country Code Example Phone Number Regex Validation
Austria 7 13 +43 +4312345678901 ^+43\d{7,13}$
Belgium 9 10 +32 +32123456789 ^+32\d{9,10}$
Bulgaria 8 9 +359 +35912345678 ^+359\d{8,9}$
Croatia 8 11 +385 +385123456789 ^+385\d{8,11}$
Cyprus 8 10 +357 +35712345678 ^+357\d{8,10}$
@gunjanpatel
gunjanpatel / cloud.md
Created November 28, 2023 14:39
Comparison of all cloud products
Category AWS Azure Google Cloud
Compute EC2, Lambda, ECS, EKS, Fargate Virtual Machines, App Service, Functions Compute Engine, App Engine, Kubernetes
Storage S3, EBS, Glacier, EFS Blob Storage, File Storage, Disk Storage Cloud Storage, Persistent Disk, Filestore
Database RDS, DynamoDB, Aurora Azure SQL Database, Cosmos DB Cloud SQL, Cloud Spanner, Firestore
Networking VPC, Route 53, CloudFront Virtual Network, Traffic Manager VPC, Cloud DNS, Load Balancing
Identity & Access Management IAM, Cognito, KMS

VS Code theme setting

Preview

Go

image

PHP

image

@gunjanpatel
gunjanpatel / 1-readme.md
Last active April 13, 2023 12:35
Tailwind CSS - Calculating Briks to be used in pavering
@gunjanpatel
gunjanpatel / undo-last-commit.md
Last active February 14, 2023 11:22
Undo / Revert last commit while keeping files in stage

Here is how you undo your last commit and keep the changes from last commit files in stag or uncommited.

reset --soft HEAD^
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6
function doGet(e){
return handleResponse(e);
}
// Enter sheet name where data is to be written below
var SHEET_NAME = "Sheet1";
@gunjanpatel
gunjanpatel / useful_commands_to_use_in_shell.md
Created April 17, 2020 16:03 — forked from jcarolinares/useful_commands_to_use_in_shell.md
This is a simple guide for non-pro bash users to do random but annoying tasks in just seconds

Useful commands to use in Shell or others:

This is a simple guide for non-pro bash users to do random but annoying tasks in just seconds

Your boss will be happy and you'll be less stressed ;)

PDFs

Search a phrase or keyword in multiple PDF:

@gunjanpatel
gunjanpatel / logistic_regression.py
Created July 5, 2019 06:25
Machine Learning with Python
import pandas as pd
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
# import warnings filter
from warnings import simplefilter
# ignore all future warnings
simplefilter(action='ignore', category=FutureWarning)
@gunjanpatel
gunjanpatel / zebra-print.py
Created May 8, 2019 09:59
Print script for zebra
#!/bin/env python
import socket, sys
PRINTER_IP = '10.1.11.121'
PORT = 9100
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((PRINTER_IP, PORT))
zpl = ''
zpl += '^XA'
@gunjanpatel
gunjanpatel / ffmpeg.md
Created October 30, 2018 09:59
FFMPEG scripts

Convert WMA to MP3

for file in *.wma; do ffmpeg -i "${file}"  -acodec libmp3lame -ab 192k "${file/.wma/.mp3}"; done