Skip to content

Instantly share code, notes, and snippets.

View ibrahim-kardi's full-sized avatar

Mohammad Ibrahim ibrahim-kardi

  • Mirpur, Dhaka -1216,Bangladesh
View GitHub Profile
## ---- 1. Backend ---- ##
// Adding a custom Meta container to admin products pages
add_action('add_meta_boxes', 'create_custom_meta_box');
if (!function_exists('create_custom_meta_box')) {
function create_custom_meta_box()
{
add_meta_box(
'custom_product_meta_box',
__(' Product Main URL <em>(orginal)</em>', 'cmb'),
@ibrahim-kardi
ibrahim-kardi / custom meta field in woocommerce product page
Created October 31, 2021 15:27
custom meta field in woocommerce product page
## ---- 1. Backend ---- ##
// Adding a custom Meta container to admin products pages
add_action('add_meta_boxes', 'create_custom_meta_box');
if (!function_exists('create_custom_meta_box')) {
function create_custom_meta_box()
{
add_meta_box(
'custom_product_meta_box',
__(' Product Main URL <em>(orginal)</em>', 'cmb'),
@Mahedi-61
Mahedi-61 / AlgorithmForBDGovt.py
Last active August 19, 2021 19:47
how BD government find Abrar Murderer
"""
Author: A cup of Tea
Description: Algorithm about how BD government is going to find Abrar Murderer
"""
def findGuiltyToAbrarMurder():
if(guilty == activistOfBCL):
victim = activistOfShibir
silenceLikeHell()
useBruteForceToRemoveMovement(BCLGang, BDPolice)
from google.colab import files
files.upload() #this will prompt you to upload the kaggle.json
!pip install -q kaggle
!mkdir -p ~/.kaggle
!cp kaggle.json ~/.kaggle/
!ls ~/.kaggle
!chmod 600 /root/.kaggle/kaggle.json # set permission
#than copy the kaggle API
!kaggle datasets download -d sohaibanwaar1203/prepossessed-arrays-of-binary-data
#not necessary
@Mahedi-61
Mahedi-61 / ubuntu.sh
Last active January 19, 2020 20:14
steps require to install ubuntu 18.04 LTS from 16.04 LTS
## Upgrading ubuntu from 16.04LTS to 18.04LTS using command line
# first update previous version
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade && sudo apt autoremove
# update manager core
sudo apt install update-manager-core
# make prompt=lts if not in following file
sudo nano /etc/update-manager/release-upgrades
@mikejolley
mikejolley / functions.php
Last active November 8, 2022 00:25
WooCommerce 3.3 - Hide uncategorized category from the shop page on the frontend
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_filter( 'woocommerce_product_subcategories_args', 'custom_woocommerce_product_subcategories_args' );
function custom_woocommerce_product_subcategories_args( $args ) {
$args['exclude'] = get_option( 'default_product_cat' );
return $args;
@Mahedi-61
Mahedi-61 / useful_unix_commands.sh
Last active January 19, 2020 20:15
some useful unix commands used most commonly.
#!/bin/bash
# This gist contains commands used in my everyday life
### compressing a file
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
# -c: create an archive.
# -z: compress the archive with gzip.
# -v: verbosity
# -f: allows you to specify the filename of the archive
@Mahedi-61
Mahedi-61 / ml_setup.sh
Last active August 25, 2022 21:36
setting python3 environment on linux machine for machine learning project
#!/bin/bash
# Instructions for installing necessary packages for running machine learning projects in Ubuntu machine
# first update and upgrade your system
sudo apt-get update
sudo apt-get install build-essential cmake g++ gfortran git pkg-config python-dev python3-tk software-properties-common wget
# install pip3 for working on python 3
sudo apt-get install python3-pip
pip3 install --upgrade pip
@Mahedi-61
Mahedi-61 / cuda_setup.sh
Created December 6, 2017 11:15
Installing CUDA toolkit v8..0 and cuDNN 6.0 on Ubuntu 16.04
#!/bin/bash
## This gist is a step by step instructions to install cuda v8.0 and cudnn 6.0 on ubuntu 16.04
## official guide: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
### steps ####
# verify the system has a cuda-capable gpu
# verify the system has gcc installed
# download and install the nvidia cuda toolkit
# download cudnn
# setup environment variables