Blog

Recursively Fix Non-ASCII Characters with Windows Power Shell

Simnple replace “your-directory” with the path you want. Or can you run in the directory you are currently in by using “.” no quotes. Happy coding. gci -recurse your-directory | where {$_.Name -match “[^\u0000-\u007F]”} | rename-item -newname {$_.name -replace “[^\u0000-\u007F]”,”1″}

Read more
PHP Functions

Randomly Generate Readable Password

function auth_pwgen(){ $pw = ”; $c = ‘bcdfghjklmnprstvwz’; //consonants except hard to speak ones $v = ‘aeiou’; //vowels $a = $c.$v; //both //use two syllables… for($i=0;$i < 2; $i++){ $pw .= $c[rand(0, strlen($c)-1)]; $pw .= $v[rand(0, strlen($v)-1)]; $pw .= $a[rand(0, strlen($a)-1)]; } //... and add a nice number $pw .= rand(10,99); return $pw; }

Read more

Convert GPT to MBR Windows

Master boot record (MBR) disks use the standard BIOS partition table. GUID partition table (GPT) disks use unified extensible firmware interface (UEFI). MBR disks do not support more than four partitions on each disk. The MBR partition method is not recommended for disks larger than 2 terabytes. You can change a disk from GPT to […]

Read more

Change Product Key Office

It can be done via the command line.  Open up a Command Prompt (Press the Windows Button and type CMD or navigate to All Programs -> Accessories -> Command Prompt).  Then you just need to use the command below that matches your OS.   For 32 bit Windows: cscript “C:\Program Files\Microsoft Office\Office15\OSPP.VBS” /inpkey:yourkeygoeshere   For […]

Read more

Zoom in with Mouse Wheel Unity 3d

Tested and Works CSharp <code> private float ZoomAmount = 0; //With Positive and negative values private float MaxToClamp = 10; private float ROTSpeed = 10; void Update(){ ZoomAmount += Input.GetAxis(“Mouse ScrollWheel”); ZoomAmount = Mathf.Clamp(ZoomAmount, -MaxToClamp, MaxToClamp); var translate = Mathf.Min(Mathf.Abs(Input.GetAxis(“Mouse ScrollWheel”)), MaxToClamp – Mathf.Abs(ZoomAmount)); gameObject.transform.Translate(0,0,translate * ROTSpeed * Mathf.Sign(Input.GetAxis(“Mouse ScrollWheel”))); } </code> Javascript <code> var […]

Read more

Woocommerce Action List

Template Hooks Actions HOOK FILE(S) get_product_search_form woocommerce-template.php woocommerce_.$product->product_type._add_to_cart woocommerce-template.php woocommerce_after_main_content archive-product.php, single-product.php woocommerce_after_shop_loop archive-product.php, loop-shop.php, woocommerce-template.php woocommerce_after_shop_loop_item content-product.php woocommerce_after_shop_loop_item_title content-product.php woocommerce_after_single_product content-single-product.php woocommerce_after_single_product_summary content-single-product.php woocommerce_after_subcategory content-product_cat.php woocommerce_after_subcategory_title content-product_cat.php woocommerce_archive_description archive-product.php, woocommerce-template.php woocommerce_before_main_content archive-product.php, single-product.php woocommerce_before_shop_loop archive-product.php, loop-shop.php, woocommerce-template.php woocommerce_before_shop_loop_item content-product.php woocommerce_before_shop_loop_item_title content-product.php woocommerce_before_single_product content-single-product.php woocommerce_before_single_product_summary content-single-product.php woocommerce_before_subcategory content-product_cat.php woocommerce_before_subcategory_title content-product_cat.php woocommerce_product_thumbnails product-image.php woocommerce_sidebar archive-product.php, single-product.php […]

Read more

Woocommerce Conditional Tags

Introduction The Conditional Tags of both WooCommerce and WordPress can be used in your Template files to change what content is displayed based on what conditions that page matches. For example, you might want to display a snippet of text above the shop page. With the is_shop() Conditional Tag you can. Since WooCommerce uses custom post types you can […]

Read more

Easy Way to Reset Password for Windows 7, Windows 8 and others

Forget your Administrator password? Quickly recover your lost account or profile. Download Lavesoft and complete the installation. It gives you the option to use a CD or USB Thumbdrive. Done. Download

Read more

Download Office Full Different Versions

Getting started If you do not have a disk, visit www.office.com/setup to get started installing and using Office for the first time. Download, install, or reinstall Most versions of Office can be managed by logging into www.office.com/myaccount with your Microsoft Account. Depending on the type of Office you purchased, you can do the following on […]

Read more

Include WordPress wp-load in separate file

$parse_uri = explode( ‘wp-content’, $_SERVER[‘SCRIPT_FILENAME’] ); require_once( $parse_uri[0] . ‘wp-load.php’ ); Include that at the top of your separate file and you’ll be good to go. 🙂

Read more