Skip to content

Instantly share code, notes, and snippets.

@neamtua
neamtua / woocommerce_update_shipping_costs.php
Created September 8, 2016 06:13
WooCommerce: Update shipping costs on checkout using ajax
<script type="text/javascript">
/* in order to update info on your checkout page you need to trigger update_checkout function
so add this in your javascript file for your theme or plugin
*/
jQuery('body').trigger('update_checkout');
/* what this does is update the order review table but what it doesn't do is update shipping costs;
the calculate_shipping function of your shipping class will not be called again;
so if you were like me and you made a shipping method plugin and you had to change costs based on payment method then
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 14, 2024 11:40
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 3, 2024 06:29
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@mohandere
mohandere / yoast-seo-sitemap.php
Last active February 4, 2024 04:58
Wordpress yoast seo plugin, generate custom sitemap for custom URLS
<?php
/**
* Create a new custom yoast seo sitemap
*/
add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' );
add_action( 'init', 'init_wpseo_do_sitemap_actions' );
// Add custom index
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………