Skip to content

Instantly share code, notes, and snippets.

View jahir07's full-sized avatar

Jahirul Islam Mamun jahir07

  • Dhaka, Bangladesh
View GitHub Profile
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
@jahir07
jahir07 / chmodr.sh
Created January 13, 2019 10:04 — forked from francisbyrne/chmodr.sh
Recursive chmod script for dirs and/or files
#!/bin/sh
#
# chmodr.sh
#
# author: Francis Byrne
# date: 2011/02/12
#
# Generic Script for recursively setting permissions for directories and files
# to defined or default permissions using chmod.
#
@jahir07
jahir07 / .htaccess
Created May 24, 2018 05:46 — forked from boogah/.htaccess
Expire headers .htaccess code.
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
@jahir07
jahir07 / skip-to-check-out.php
Created May 8, 2018 06:08 — forked from micc83/skip-to-check-out.php
Skip cart and redirect to direct checkout on WooCommerce
<?php
/**
* Skip cart and redirect to direct checkout
*
* @package WooCommerce
* @version 1.0.0
* @author Alessandro Benoit
*/
// Skip the cart and redirect to check out url when clicking on Add to cart
@jahir07
jahir07 / tp-tinymce-background-color.php
Created October 10, 2017 10:17 — forked from thierrypigot/tp-tinymce-background-color.php
Add Background Color (Highlight) Option in WordPress Editor TinyMCE
<?php
/* Hook to init */
add_action( 'init', 'tp_editor_background_color' );
/**
* Add TinyMCE Button
*/
function tp_editor_background_color()
{
/* Add the button/option in second row */
@jahir07
jahir07 / WPGeoQuery.md
Created August 3, 2017 19:08 — forked from jackabox/WPGeoQuery.md
WordPress Geo Location Query

WP Geo Query

Quick and easy class created to modify the WP_Query on specific calls and pull in all posts within a radius from a given latitude and longitude.

@jahir07
jahir07 / PHP Countries Array
Created July 29, 2017 18:15 — forked from DHS/PHP Countries Array
PHP array of all country names
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island
<?php
/*
Register Fonts
*/
function studio_fonts_url() {
$font_url = '';
/*
Translators: If there are characters in your language that are not supported
by chosen font(s), translate this to 'off'. Do not translate into your own language.
//disable redux dev mode
if ( ! function_exists( 'wppoliticalz_redux_disable_dev_mode_plugin' ) ) {
function wppoliticalz_redux_disable_dev_mode_plugin( $redux ) {
if ( $redux->args['opt_name'] != 'redux_demo' ) {
$redux->args['dev_mode'] = false; //helps to disable dev mode but in localhost ad still appear
$redux->args['forced_dev_mode_off'] = false; //helps to disable ad totally
}
}
add_action( 'redux/construct', 'wppoliticalz_redux_disable_dev_mode_plugin' );