Skip to content

Instantly share code, notes, and snippets.

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

Md. Mahedi Hasan mahedihasannoman

🏠
Working from home
View GitHub Profile
@mahedihasannoman
mahedihasannoman / ssh.md
Created February 12, 2023 18:20 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

If your time does not permit the close supervision of your project then i am here for your help related with LAMP or LEMP Stack and others.
Contact Me For Engaged Your Works:
Telegram: https://t.me/LinuxGun
WhatsApp: https://wa.link/5ow7oz
#!/bin/bash
# This will remove Apache
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin
@mahedihasannoman
mahedihasannoman / mysql-docker.sh
Created December 20, 2022 12:12 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@mahedihasannoman
mahedihasannoman / import.md
Created December 20, 2022 12:11 — forked from iamstoick/import.md
How to import database in MySQL in Docker?

This is a simple way of importing MySQL database in Docker.

  1. In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.

  2. Put the exported sql file in the shared folder.

  3. Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash.

  4. Login to MySQL via mysql -u USERNAME -p.

@mahedihasannoman
mahedihasannoman / docker-help.md
Created November 18, 2022 16:27 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@mahedihasannoman
mahedihasannoman / Slimdown.md
Created March 10, 2022 08:22 — forked from jbroadway/Slimdown.md
Slimdown - A simple regex-based Markdown parser.
@mahedihasannoman
mahedihasannoman / woo-product-attributes-bulk-modifier.php
Created December 18, 2021 13:40 — forked from birgire/woo-product-attributes-bulk-modifier.php
WordPress: WooCommerce Product Attributes - Bulk Modifier ( from custom meta attributes to taxonomy attributes)
<?php
/**
* Plugin Name: WooPAM: Woo Product Attributes Modifier
* Description: Bulk update 'custom meta product attributes' to 'taxonomy product attributes' in WooCommerce. Supports the GET variables, like: woopam_mode=run&woopam_from_attribute_meta=colour&woopam_to_attribute_tax=pa_colour&woopam_keep_attribute_meta&woopam_posts_per_page=10&woopam_paged=0&woopam_post_type=product&woopam_post_status=any. WARNING: Backup DB first!!!
* Plugin Author: birgire
* Author URI: https://github.com/birgire
* Plugin URI: https://gist.github.com/birgire/0ed300ae4436fcaf508c
* Version: 1.0.0
* License: GPL2+
* Text Domain: woopam
<?php
/**
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI: http://ericteubert.de
* License: MIT
*/