Skip to content

Instantly share code, notes, and snippets.

View mhm13dev's full-sized avatar
💥
Fullstack Web Developer

Mubashir Hassan mhm13dev

💥
Fullstack Web Developer
View GitHub Profile
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active May 3, 2024 12:19
Building a react native app in WSL2
@cristian-aldea
cristian-aldea / slick-terminal.md
Last active April 28, 2024 21:58
Ubuntu + Zsh + Oh My Zsh + Powerlevel10k = Sliiiiiiiiiiiiick

Based on: https://gist.github.com/kevin-smets/8568070

This gist outlines the steps needed to setup zsh, ohmyzsh and the powerlevel10k theme, available for anyone to follow.

  1. Setup required dependencies

    # update packages
    sudo apt update
    
@Godofbrowser
Godofbrowser / axios.refresh_token.1.js
Last active April 26, 2024 12:57 — forked from culttm/axios.refresh_token.js
Axios interceptor for refresh token when you have multiple parallel requests. Demo implementation: https://github.com/Godofbrowser/axios-refresh-multiple-request
// for multiple requests
let isRefreshing = false;
let failedQueue = [];
const processQueue = (error, token = null) => {
failedQueue.forEach(prom => {
if (error) {
prom.reject(error);
} else {
prom.resolve(token);
@willpower232
willpower232 / etc_nginx_sites-enabled_test
Last active May 20, 2023 15:23
Run Nginx on WSL (Ubuntu on Windows) with automatic domain names and environment for local development
server {
listen 80;
listen 443 ssl http2;
# make yourself an SSL certificate for *.test.test (and your dhparam file if you're so inclined)
ssl_certificate /etc/nginx/ssl/test.cert;
ssl_certificate_key /etc/nginx/ssl/test.key;
# your other favourite SSL settings go here
@cthurston
cthurston / mongodb-facet-combine.js
Created November 3, 2017 14:21
MongoDb combine $facet results into a single result set.
db.getCollection('list').aggregate([
{
$facet: {
"events":[{
$match: {
'type': 'Event'
}
}],
"tasks": [{
$match: {