Skip to content

Instantly share code, notes, and snippets.

View Luminus's full-sized avatar

Luminus Olumide Alabi Luminus

View GitHub Profile
@Luminus
Luminus / relocate_eu_vat.php
Created July 17, 2017 12:58
Change the position of the EU VAT Number field on the Checkout page
remove_action( 'woocommerce_after_checkout_billing_form', array( 'WC_EU_VAT_Number', 'vat_number_field' ) );
add_action( 'HOOK-YOU-WANT-TO-ADD-IT-TO', array( 'WC_EU_VAT_Number', 'vat_number_field' ) );
@Luminus
Luminus / gist:e5d8149df1c70ef121f07cd42d36e2c1
Last active June 12, 2017 13:00
Get MailCatcher to work with Nginx
location ~ \.php$ {
fastcgi_param PHP_VALUE "sendmail_path=/usr/bin/env PATH/TO/catchmail -f [email protected]";
}
@Luminus
Luminus / functions.php
Last active July 25, 2016 18:30
WooCommerce Product Vendors: Change vendor URL slug
add_filter( 'wcpv_vendor_slug', 'change_vendor_slug' );
function change_vendor_slug( $slug ) {
return 'new_slug';
}

Keybase proof

I hereby claim:

  • I am luminus on github.
  • I am luminus (https://keybase.io/luminus) on keybase.
  • I have a public key whose fingerprint is F104 0029 018E A112 D080 E5CF D5EB BA2B 88EF 0CA2

To claim this, I am signing this object:

@Luminus
Luminus / github-create
Last active August 29, 2015 14:21
Create a GitHub repo from Terminal. Paste this in ~/.bash_profile or if like me you use zsh, paste it in ~/.zshrc
github-create() {
repo_name=$1
dir_name=`basename $(pwd)`
if [ "$repo_name" = "" ]; then
echo "Repo name (hit enter to use '$dir_name')?"
read repo_name
fi
@Luminus
Luminus / post.thor
Created May 4, 2015 03:44
Automate Post Creation in Jekyll by putting this file in the root of the jekyll project and installing the required gems
require "stringex"
require "thor"
class Post < Thor
desc "new TITLE", "Create a new post"
method_option :editor, :default => "mou"
method_option :date, aliases: "-d",
default: Time.now.strftime('%Y-%m-%d'),
@Luminus
Luminus / erb2slim.sh
Last active August 29, 2015 14:17
Convert all .erb files in your rails app to .slim
find ./app/views -name '*.erb' | xargs -I file sh -c \
'html2haml --erb file | haml2slim > $(echo file | sed 's/erb/slim/') && \
rm file'
Verifying that +luminus is my openname (Bitcoin username). https://onename.com/luminus
@Luminus
Luminus / gist:897133afb4f6ddb1a6fe
Created February 24, 2015 00:33
Anvil + Pow + Powder with no internet connection
# Anvil installs Pow if you don't already have it installed.
# Add your sites to Anvil to get your .dev domains
# Install Powder
gem install powder
# Add your .dev domains to your /etc/host file
# This way, whether you have an internet connection or not, you're good.
powder host
@Luminus
Luminus / gist:9b569213e796696542d2
Last active March 14, 2018 07:32
Rename the default git that comes with OSX to remove it from $PATH after installing an up-to-date version
sudo mv /usr/bin/git /usr/bin/git-apple