Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| <?php | |
| // Code goes in theme functions.php or a custom plugin | |
| add_filter( 'pre_option_woocommerce_enable_guest_checkout', 'conditional_guest_checkout_based_on_product' ); | |
| function conditional_guest_checkout_based_on_product( $value ) { | |
| $restrict_ids = array( 1, 2, 3 ); // Replace with product ids which cannot use guest checkout | |
| if ( WC()->cart ) { | |
| $cart = WC()->cart->get_cart(); |
| <?php // Do not include this if already open! | |
| /** | |
| * Remove existing tabs from single product pages. | |
| */ | |
| function remove_woocommerce_product_tabs( $tabs ) { | |
| unset( $tabs['description'] ); | |
| unset( $tabs['reviews'] ); | |
| unset( $tabs['additional_information'] ); | |
| return $tabs; |
| <?php // Do not include this if already open! | |
| /** | |
| * Code goes in theme functions.php. | |
| */ | |
| add_filter( 'woocommerce_get_order_item_totals', 'custom_woocommerce_get_order_item_totals' ); | |
| function custom_woocommerce_get_order_item_totals( $totals ) { | |
| unset( $totals['payment_method'] ); | |
| return $totals; |
| # Gawk version | |
| # Remote | |
| grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}' | |
| # Local | |
| grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}' | |
| # No Gawk | |
| # Local | |
| grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ |
If you, like me, resent every dollar spent on commercial PDF tools,
you might want to know how to change the text content of a PDF without
having to pay for Adobe Acrobat or another PDF tool. I didn't see an
obvious open-source tool that lets you dig into PDF internals, but I
did discover a few useful facts about how PDFs are structured that
I think may prove useful to others (or myself) in the future. They
are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.
Hanging out in subtitling and video re-editing communities, I see my fair share of novice video editors and video encoders, and see plenty of them make the classic beginner mistakes when it comes to working with videos. A man can only read "Use Handbrake to convert your mkv to an mp4 :)" so many times before losing it, so I am writing this article to channel the resulting psychic damage into something productive.
If you are new to working with videos (or, let's face it, even if you aren't), please read through this guide to avoid making mistakes that can cost you lots of computing power, storage space, or video quality.