This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost dev.example.com:80> | |
ServerName dev.example.com | |
DocumentRoot "C:/xampp/htdocs/dev.example.com/public" | |
<Directory "C:/xampp/htdocs/dev.example.com/public"> | |
Require all granted | |
AllowOverride All | |
</Directory> | |
ErrorLog "logs/dev.example.com-error.log" | |
CustomLog "logs/dev.example.com-access.log" combined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.electro-mode-switcher { | |
display: flex; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "=========== START LOCAL HTTP / HTTPS TUNNEL AND UPDATE YOUR REMOTE DEV DOMAIN TO POINT IT ===========" | |
printf "\n" | |
# Start NGROK in background | |
echo "⚡️ Starting ngrok" | |
ngrok http 8080 > /dev/null & | |
# Wait for ngrok to be available | |
while ! nc -z localhost 4040; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Disables Vanguard from starting when you boot your computer | |
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_shipment_tracking_default_provider', 'custom_woocommerce_shipment_tracking_default_provider' ); | |
function custom_woocommerce_shipment_tracking_default_provider( $provider ) { | |
$provider = 'USPS'; | |
return $provider; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using System; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Little utility for opening a "Game" view in fullscreen. Will be opened on whatever Unity thinks is the "main" | |
/// monitor at the moment. The hotkey will toggle the window; however, if for some reason this breaks, fullscreen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param string $content | |
* | |
* @return string | |
*/ | |
function purify(string $content) : string | |
{ | |
$config = \HTMLPurifier_Config::createDefault(); | |
$config->set('HTML.AllowedElements', [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We have a client that ships from multiple warehouses using zones to determine | |
pricing. They maintain the zones in a Goole Maps document. We are creating a | |
front end that clients can enter their address and we'll show them what their | |
shipping options are. We will have the client export their zones as a KML | |
file and we'll import it into a MySQL database and use ST_Contains to find | |
the shipping zone(s) customers are in. (They can only be in one zone for any | |
given warehouse but may be within range of multiple warehouses.) | |
One thing to point out is there is confusion about the order of latitude and | |
longitude. Mathematically, it is naturally ordered "longitude, latitude" but |
NewerOlder