Skip to content

Instantly share code, notes, and snippets.

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

goodmuyis

🏠
Working from home
View GitHub Profile
@goodmuyis
goodmuyis / Bootstrap4StripDown.css
Last active February 27, 2021 08:30
Bootstrap 4 Strip Down CSS class - Included margins, Paddings,
/*!
* Bootstrap v4.0.0 (https://getbootstrap.com)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
*,::after,::before{box-sizing:border-box}
html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}
@-ms-viewport{width:device-width}
article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
@goodmuyis
goodmuyis / linux-usb-file-copy-fix.md
Created December 29, 2020 21:10 — forked from 2E0PGS/linux-usb-file-copy-fix.md
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

I suggest you edit your /etc/rc.local file to make this change persistant across reboots.

sudo nano /etc/rc.local

@goodmuyis
goodmuyis / export-single-day.php
Created August 20, 2020 21:46 — forked from birgire/export-single-day.php
WordPress Plugin: Enhance the native XML export - with a single day selection
<?php
/**
* Plugin Name: Single Day Posts Export
* Plugin URL: http://wordpress.stackexchange.com/a/199527/26350
* Plugin Author: Birgir Erlendsson (birgire)
* Version: 0.0.1
*/
/**
* Add our extra HTML
@goodmuyis
goodmuyis / htaccess-redirect-load-images-from-production
Created January 9, 2020 14:57 — forked from rxnlabs/htaccess-redirect-load-images-from-production
htaccess - Redirect image and file request from the localhost to the production host if the file does not exist on the localhost. Needs to be placed in the root htaccess if you're using WordPress or another system that redirects all request to a index.php file.
#place above all other rewrite rules if using a cms or program that redirects all request to index.php file (e.g. WordPress, Drupal, Laravel, etc...)
#if a file or directory does not exist on the local host, 302 redirect the request to the production host so the browser doesn't cache the file in case you replace the file locally
<IfModule mod_rewrite.c>
RewriteEngine On
#Redirect WordPress uploads
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule wp-content/uploads/(.*)$ http://www.example.com/wp-content/uploads/$1 [R=302,L,NC]
#Redirect Nextgen Gallery uploads
@goodmuyis
goodmuyis / mysql-docker.sh
Created October 4, 2019 11:03 — 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
@goodmuyis
goodmuyis / pmpro_ngn_currency_format.php
Last active February 16, 2019 20:21 — forked from ideadude/pmpro_xof_currency_format.php
Add Nigerian Naira currency to Paid Memberships Pro
<?php
/**
* Add Nigerian Naira currency to Paid Memberships Pro
* Add this code into a custom plugin. https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function pmpro_ngn_currency_format( $pmpro_currencies ) {
$pmpro_currencies['XOF'] = array(
'name' => __( 'Nigerian Naira', 'paid-memberships-pro' ),
'decimals' => '2',
'thousands_separator' => ',',
@goodmuyis
goodmuyis / um_function.php
Last active January 30, 2019 17:20 — forked from dave-mills/example.php
Example Callback function for Ultimate Member dropdown field
function getCities() {
//get the value from the 'parent' field, sent via the AJAX post.
$choice = $_POST['parent_option'];
//Depending on the value of $choice, return a different array.
switch($choice) {
case "France":
$cities = [
"Paris" =>"Paris",
Abia
- Aba South
- Arochukwu
- Bende
- Ikwuano
- Isiala Ngwa North
- Isiala Ngwa South
- Isuikwuato
- Obi Ngwa
- Ohafia
@goodmuyis
goodmuyis / Nigeria States Plain Text [by GoodMuyis]
Last active March 4, 2023 18:44
Plain text list of state in Nigeria [by GoodMuyis]
Abia
Adamawa
Akwa Ibom
Anambra
Bauchi
Bayelsa
Benue
Borno
Cross River
Delta