Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Laurence Bahiirwa bahiirwa

🏠
Working from home
View GitHub Profile
@bahiirwa
bahiirwa / example-wp-list-table.php
Created Mar 6, 2021 — forked from paulund/example-wp-list-table.php
An example code of using the WP_List_Table class. With Pagination.
View example-wp-list-table.php
<?php
/*
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI: http://www.paulund.co.uk
* Author: Paul Underwood
* Author URI: http://www.paulund.co.uk
* Version: 1.0
* License: GPL2
*/
@bahiirwa
bahiirwa / Change-Kuwait-Currency-for-WooCommerce.php
Created Jan 26, 2021
Change Kuwaiti Currency in WooCommerce
View Change-Kuwait-Currency-for-WooCommerce.php
<?php
/**
* Plugin Name: Change Kuwaiti Currency in WooCommerce
* Plugin URI: https://github.com/yttechiepress/kuwaiti-currency
* Author: TechiePress
* Author URI: https://github.com/yttechiepress/kuwaiti-currency
* Description: Change Currencies in WooCommerce
* Version: 0.1.0
* License: GPL2
* License URL: http://www.gnu.org/licenses/gpl-2.0.txt
View digest-auth-remote-get.php
<?php
/**
* Make a remote GET using DIGEST authentication.
*
* DIGEST authenticated requests require two GET requests:
* 1. GET the www-authenticate header for nonce, realm, opaque, and other values
* 2. GET the expected response body by constructing an 'Authorization' header
* with nonce, realm, and other values provided by the server.
*
View wp-graphql-admin-color-schemes.php
add_action( 'graphql_register_types', function() {
$mock_colors = '
{
"fresh":{
"name":"Default",
"url":false,
"colors":[
"#222",
"#333",
View registration-fields.php
<?php
/*
Plugin Name: Custom Registration Fields
Plugin URI:
Description:
Version: 0.1
Author: CSSIgniter
Author URI:
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@bahiirwa
bahiirwa / Taxi drivers
Created Apr 20, 2020
Taxi drivers story earnings
View Taxi drivers
TAKE SOMETIME AND READ WHAT I DISCOVERED ABOUT THE UNTOLD WORLD OF TAXIs/MATATUs IN KAMPALA.
By Henry Mutebe
Forgive me …I am going to use very informal language here. Okay? Alright…so…out of curiosity (the burden of an inquiring mind), I had a wonderful conversation with a taxi driver to understand the matatu/taxi business in Kampala. Initially, I simply wanted to keep the driver awake. Seated next to him, I realized I could do a good job asking and learning a few things from him while helping him keep awake. As we sped through the silence of the night, I engaged him in a conversation that turned out to be a very interesting learning experience about the organisation of taxi drivers and their business.
I asked him to share with me the Hows, Whys, Whats and Whens of the taxi business and who gets what amount of money. This is what he told me about their organisation, business and dynamics of taxis:
He said that in the old taxi park, each stage has a committee that governs all the drivers, touts/’conductor
@bahiirwa
bahiirwa / .htaccess
Created Mar 19, 2020 — forked from johnalarcon/.htaccess
Directives for the ClassicPress .htaccess file. These directives can be copied into your exisitng .htaccess file, but they are not intended to overwrite other directives that may already be present. Read the comment before each directive below, and you'll be fine!
View .htaccess
# Code Potent's official .htaccess directives to make your ClassicPress site ROCK!
# Prevent directory browsing.
Options -Indexes
# Enable rewrite engine - you may already have these 2 lines... don't duplicate, if so.
RewriteEngine On
RewriteBase /
# Force SSL connection to everything (URLs, images, scripts, styles, etc)
@bahiirwa
bahiirwa / woocommerce.php
Created Nov 27, 2019 — forked from zulfgani/woocommerce.php
WooCommerce Addons compatibility for ClassicPress
View woocommerce.php
<?php
/**
* Plugin Name: Woo Addons Compatibility
* Plugin URI: https://github.com/zulfgani/woocommerce
* Description: A compatibility plugin for some WooCommerce addons to work with ClassicCommerce.
* Version: 10.0.1111
* Author: I have no idea
* Author URI: https://ihavenoideapleasedontquoteme.com
*
* @package Woo Addons Compatibility
@bahiirwa
bahiirwa / gist:f1830f5b16f22ac2bc52197cd84b9683
Created Aug 17, 2019 — forked from Marian0/gist:4d689c33164bc9daf0e1
Disable wordpress Frontend by htaccess
View gist:f1830f5b16f22ac2bc52197cd84b9683
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !/wp-admin
RewriteCond %{REQUEST_URI} !/wp-includes
RewriteCond %{REQUEST_URI} !/wp-login\.php$
RewriteCond %{REQUEST_URI} !/wp-content
RewriteCond %{REQUEST_URI} !/feed
@bahiirwa
bahiirwa / hide-wp5-updates.php
Created Jul 6, 2019 — forked from nylen/hide-wp5-updates.php
Keep a WordPress site on 4.9.x with security updates
View hide-wp5-updates.php
<?php
/**
* Plugin Name: Ignore WP5 Updates
* Plugin URI: https://gist.github.com/nylen/44adecb537d65bd4c64be8007cd1523b
* Description: Keep a site on WP 4.9.x with security updates
* Version: 1.1.0
* Author: James Nylen
* License: GPLv2 - https://www.gnu.org/licenses/gpl-2.0.html
*/