Skip to content

Instantly share code, notes, and snippets.

View hasinhayder's full-sized avatar
🚀
Back on track, yayyyy!

Hasin Hayder hasinhayder

🚀
Back on track, yayyyy!
View GitHub Profile
@hasinhayder
hasinhayder / docker-compose.yml
Created July 10, 2022 12:56
mariadb + adminer
version: '3.8'
services:
mariadb:
image: mariadb:10.8
restart: always
ports:
- 3307:3306
volumes:
- ./mariadb:/var/lib/mysql
@hasinhayder
hasinhayder / docker-compose.yml
Last active July 2, 2022 21:06
mariadb and phpmyadmin docker image
version: '3.1'
services:
mariadb:
image: mariadb:10.8
restart: always
ports:
- 3306:3306
volumes:
- ./mariadb:/var/lib/mysql
@hasinhayder
hasinhayder / all-packages-restore.md
Created February 12, 2022 09:44
Package Copy & Restore

https://askubuntu.com/posts/9889/edit

How to keep a list of all packages and restore using dpkg

  1. It'd be a good idea to just copy all of /home as that contains your documents and preferences. If you just want to know where preferences are stored, it varies. Many applications store them in .config (that's /home/username/.config) and .local. Most user preferences will be in .gconf. Some older applications might save settings in .gnome2. Firefox uses .mozilla; other browsers use .config as far as I know. To be safe, I'd just recommend backing up /home still.

  2. Run dpkg --get-selections > ~/my-packages.txt to build up a list of everything installed (or removed) on your system. It will be saved in your home folder as my-packages.txt. Once you reinstall, run sudo dpkg --set-selections < ~/my-packages.txt (assuming the file is placed in the same location again) and then sudo apt-get -u dselect-upgrade to start installing packages. You'll want to also back up /etc/apt/ and restore it

@hasinhayder
hasinhayder / readme.md
Created January 26, 2022 10:03
Remove Grub Bootloader From Windows

Remove Boot Loader EFI / System Partion in Windows 10

Quick Guide

Open PowerShell as Administrator

mountvol S: /S
S:
cd .\EFI\

dir

@hasinhayder
hasinhayder / jquery.md
Created January 26, 2022 09:14
Import jQuery in ESM

You can create a module converter like below:

// jquery.module.js
import 'https://code.jquery.com/jquery-3.6.0.min.js'
export default window.jQuery.noConflict(true)

This will remove global variables introduced by jQuery and export jQuery object as default.

Then use it in your script:

@hasinhayder
hasinhayder / script.sh
Created January 8, 2022 20:26
Mechanical Keyboard Key Not Repeating Problem Fixed in Mac
defaults write -g ApplePressAndHoldEnabled -bool false
@hasinhayder
hasinhayder / mousewheel.sh
Created January 5, 2022 15:14
imwheel config
#!/bin/bash
# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints http://www.nicknorton.net
# GUI for mouse wheel speed using imwheel in Gnome
# imwheel needs to be installed for this script to work
# sudo apt-get install imwheel
# Pretty much hard wired to only use a mouse with
# left, right and wheel in the middle.
# If you have a mouse with complications or special needs,
# use the command xev to find what your wheel does.
@hasinhayder
hasinhayder / mutate.html
Created October 11, 2021 20:10
Mutate AlpineJS Object's Data in Different Ways
<html>
<head>
<title>Mutating AlpineJS Object Data</title>
</head>
<body>
<button onclick="changeDataByDispatchingEvent()">Mutate Alpine Object's Data Using Event</button>
<br>
<br>
<?php
/**
* WP SmartPay - bKash Gateway
*
* Plugin Name: WP SmartPay - bKash Gateway
* Plugin URI: https://wpsmartpay.com/
* Description:
* Tags: bKash
* Version: 0.1
.flex-grid {
display: flex;
flex-flow: wrap;
}
.col-1 {flex: 0 0 8.3333%}
.col-2 {flex: 0 0 16.6666%}
.col-3 {flex: 0 0 25%}
.col-4 {flex: 0 0 33.3333333%}
.col-5 {flex: 0 0 41.6666%}