Skip to content

Instantly share code, notes, and snippets.

View harish81's full-sized avatar
🏠
Working from home

Harish Nandoliya harish81

🏠
Working from home
View GitHub Profile
@harish81
harish81 / alert.js
Created May 28, 2020 02:46
Promise Based Bootstrap Modal As Confirmation Box or Alert.
function bsPopup(title = 'Alert', msg = 'Are you sure?') {
return new Promise((resolve, reject) => {
const autoId = 'modal' + new Date().getTime();
const modal = `
<div class="modal fade" id="${autoId}" tabindex="-1">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><i class="fa fa-exclamation-triangle mr-1"></i> ${title}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
@amiranagram
amiranagram / select2.blade.php
Created June 29, 2021 13:51
Select2 multiple - Livewire/Alpine
<div
x-data="{
model: @entangle($attributes->wire('model')),
}"
x-init="
select2 = $($refs.select)
.not('.select2-hidden-accessible')
.select2({
theme: 'bootstrap',
dropdownAutoWidth: true,
@denguir
denguir / cuda_install.md
Last active July 16, 2024 16:03
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation