Skip to content

Instantly share code, notes, and snippets.

View bilawal-liaqat's full-sized avatar
🎯
Focusing

Bilawal Liaqat bilawal-liaqat

🎯
Focusing
  • Lahore , Pakistan
View GitHub Profile
import React, { createContext, useContext, useState } from "react";
const YourContext = createContext({});
const { Provider, Consumer } = YourContext;
const YourProvider = ({ children, ...props }) => {
const [state, setState] = useState(null);
return (
<Provider value={{ state }} {...props}>

Laravel alternatives in NodeJS

These are alternative packages/frameworks in NodeJS that cover some of the primary features in Laravel. This is by no means a comprehensive list of Laravel features (or a comprehensive list of NodeJS alternatives).

Depending on your perspective, this list either shows how it's possible to switch from Laravel to NodeJS or shows why you'd want to stay with Laravel 😃


Full stack framework alternatives: Nest, Adonis

@bilawal-liaqat
bilawal-liaqat / ArrayInterview.swift
Last active March 14, 2019 14:24
Swift Array interview questions
func removeDuplicate(_ list : [Int]) -> Array<Int>{
var result = [Int]()
var previous = list[0]
result.append(previous)
for i in 1 ..< list.count {
let check = list[i]
if previous != check{
result.append(check)
}
@bilawal-liaqat
bilawal-liaqat / README.md
Created February 21, 2019 10:52 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


th-TH
ca-ES
fr-BE
de-CH
sk-SK
en-ZA
es-CL
zh-CN
zh-TW
da-DK
@bilawal-liaqat
bilawal-liaqat / .gitignore
Created November 28, 2018 08:26 — forked from simonexmachina/.gitignore
Example .gitignore file for iOS projects
## Build generated
build/
DerivedData
build.xcarchive
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
@bilawal-liaqat
bilawal-liaqat / StringExtention.swift
Created October 19, 2018 12:43
Swift string find substring index
extension StringProtocol where Index == String.Index {
func index(of string: Self, options: String.CompareOptions = []) -> Index? {
return range(of: string, options: options)?.lowerBound
}
func endIndex(of string: Self, options: String.CompareOptions = []) -> Index? {
return range(of: string, options: options)?.upperBound
}
func indexes(of string: Self, options: String.CompareOptions = []) -> [Index] {
var result: [Index] = []
var start = startIndex
@bilawal-liaqat
bilawal-liaqat / NEHotspotConfigurationManager.swift
Created October 11, 2018 05:35 — forked from kraigspear/NEHotspotConfigurationManager.swift
Connect to a WIFI hotspot programmatically in iOS 11
//
// ViewController.swift
// NetworkTest
//
// Created by Kraig Spear on 10/10/17.
// Copyright © 2017 spearware. All rights reserved.
//
import UIKit
import NetworkExtension
@bilawal-liaqat
bilawal-liaqat / notes_soft_skills.md
Created September 10, 2018 08:45 — forked from raviwu/notes_soft_skills.md
[Notes] Soft Skills: The software developer's life manual

Page 47

This kind of mindset is crucial to managing your career, because when you start to think of yourself as a business, you start to make good business decisions.

Page 52

Every step you take without a clear direction is a wasted step. Don’t randomly walk through life without a purpose for your career.

Your big goal should be something not too specific, but clear enough that you can know if you’re steering toward it or not. Think about what you want to ultimately do with your career.

@bilawal-liaqat
bilawal-liaqat / OptionalCheck.swift
Last active June 29, 2018 10:43
swift double question mark optional usage
// This is a shortcut for user.posts != nil ? user.posts.count : 0
let count = user.posts?.count ?? 0