Skip to content

Instantly share code, notes, and snippets.

View mkhizeryounas's full-sized avatar
:octocat:
Creating

Khizer Younas mkhizeryounas

:octocat:
Creating
View GitHub Profile
{
"keys": [
{
"kty": "RSA",
"kid": "YL3gLAPGmmEk7ufk-cbK6_SrPAcPeLIpCw-l3ijferQ",
"use": "sig",
"alg": "RS384",
"e": "AQAB",
"n": "sgqeMd56yk4ZYxKC2oQn05P0BZZMVhHgFeu9CNJswmQlhv3KL9fGtn65aOEKpWdLhgYpOKGFqj-efY6X9TR34TnhG0eM3SFPVqEzAIiHW0w6fSDTAmnm_YOUw6apQj1BJVNdVaNjaOaCFeQy2KtoVJfZn3CiZaQUw3yqi7oWSirBMwWlhvw4PzpvE6rgt2UM9JVtvwWJuwgLS2jsxoqAuuV79jHcTKkj0W4_hOLJuT1wyrV9-KL8rQggUlzkmR6ilkpXXvqPn2y0rI_kNHmNthAeG8G85R25eFdclS7fxMrnCfifEpqFdqoHYUJiqdNKktuRWJoLHQ9SNEvDlq1lcQ"
}
@mkhizeryounas
mkhizeryounas / patch-package.sh
Created May 5, 2023 00:04
Patch npm packages script using patch-package
#!/usr/bin/env sh
ROOT_DIR=$(cd "$(dirname "$0")/..";pwd -P)
PACKAGE_NAME=${1:-}
COMPLETE_FLAG="--complete"
if [ -z "$PACKAGE_NAME" ]; then
echo "Usage ./`basename $0` <app-name> <package>"
echo " i.e. ./`basename $0` applicant-app react-native"
exit 1
fi
import express from 'express';
import Joi from './joi';
import validate from 'express-validation';
import HttpStatus from 'http-status-codes';
import logger from './logger';
const validators = {
list: {
query: {
limit: Joi.number().min(0).max(100).default(25),
@mkhizeryounas
mkhizeryounas / hungerist.json
Last active October 4, 2021 09:15
Restaurant list from hungersit.com
{
"data": [
{
"id": 933,
"user_id": null,
"name": "Caspian Sea",
"description": "Caspian sea is considered to be one of the best food corners. It has a large variety of food along with a very pleasant ambiance, wonderful location and dining facilities. A must visit and dine in place.",
"slug": "caspian-sea",
"thumb_image": "https://cdn.hungerist.com/public/uploads/rest/featured/03094630127864_2032553690153238_5340232413085696000_n.jpg",
"featured_image": "https://cdn.hungerist.com/public/uploads/rest/featured/03094630127864_2032553690153238_5340232413085696000_n.jpg",
@mkhizeryounas
mkhizeryounas / country-list.json
Last active February 10, 2021 22:04
List of country codes
[
{
"code":"AF",
"id":1,
"label":"Region",
"name":"Afghanistan",
"phone_country_code":93,
"provinces":[
],
@mkhizeryounas
mkhizeryounas / cloudSettings
Last active September 23, 2021 15:46
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-04-30T23:36:01.041Z","extensionVersion":"v3.4.3"}
@mkhizeryounas
mkhizeryounas / shopify-checkout-complete.html
Created March 18, 2020 21:32
Order complete redirect script for headless shopify
<script>
let base_url = 'https://zarashahjahan.com';
let url = '';
try {
let order_id_sel = document.getElementsByClassName("os-order-number")
let orderid = order_id_sel.length ? order_id_sel[0].innerText.toLocaleLowerCase().replace("order", "").trim() : null
const mop =
document.getElementsByClassName('payment-method-list_item_info')
.length !== 0
@mkhizeryounas
mkhizeryounas / main.py
Created March 8, 2020 17:56
Enroll Fingerprint Code
import serial, time, datetime
import struct #Convert between strings and binary data
import sys
import os
import binascii
import mysql.connector
cnx=mysql.connector.connect(user='root',password='root',host='localhost',database='fingerdb', port=8889) # connect to MySql database
cur=cnx.cursor()
ser = serial.Serial('/dev/tty.usbmodem14101',57600) # serial communication in Linux
@mkhizeryounas
mkhizeryounas / .eslintrc
Created December 24, 2019 19:26
ES lint file according to google's javascript standerd
{
"env": {
"node": true
},
"parserOptions": {
"ecmaVersion": 8
},
"globals": {
/**
* This example will convert all boolean values into string.
**/
function parse(obj, parent) {
for (let key in obj) {
let value = obj[key];
if (typeof value === "object") {
let tmpParent = Array.isArray(value)) ? [] : {};
parent[key] = parse(value, tmpParent);