Skip to content

Instantly share code, notes, and snippets.

View JunaidQadirB's full-sized avatar
🐢

Junaid Qadir JunaidQadirB

🐢
View GitHub Profile
@JunaidQadirB
JunaidQadirB / README.md
Last active August 29, 2022 14:48
Extended version of Tags example. Implemented using Bootstrap5

This is an extended version of the tags example in the alpine.js repository with `Bootstrap5. My implementation is a bit comprehensive with the following features:

  • It doen't allow duplicate tags
  • Adding duplicate tag would throw a nice error
  • All tags can be cleared at once
  • It will prompt when clearing all tags

Demo

Here's the demo https://imgur.com/KGf95Fa

@JunaidQadirB
JunaidQadirB / write_permission.md
Created April 7, 2021 07:38
Write Permission

sudo chmod -R ugo+rw path

<?php
// UserViewModel.php
class UserViewModel extends ViewModel
{
public User $user;
public function __construct(User $user)
{
$this->user = $user;
@JunaidQadirB
JunaidQadirB / watch.py
Created May 29, 2023 05:29
Watch - A simple script to watch for changes in a python file and run it.
import argparse
import subprocess
import time
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
'''
Watch - A simple script to watch for changes in a python file and run it.
Usage: python watch.py [script_file]
@JunaidQadirB
JunaidQadirB / switchphp.sh
Created September 8, 2023 10:22
Switch PHP Versions
#!/bin/bash
php_new_version=$1
if [ -z "$php_new_version" ]
then
echo "Please enter which PHP version do you want to switch to."
exit 1
fi