1. Setup ODBC on your Mac (including Apple Silicon)
Install brew
unixodbc package from brew works for Apple Silicon
1. Setup ODBC on your Mac (including Apple Silicon)
Install brew
unixodbc package from brew works for Apple Silicon
| <?php | |
| /** | |
| * Plugin Name: WooCommerce Composite Products - Hide Components in all Templates | |
| * Plugin URI: https://woocommerce.com/products/composite-products/ | |
| * Description: Use this snippet to hide Components in the cart, checkout, order and e-mail templates. | |
| * Version: 1.0 | |
| * Author: WooCommerce | |
| * Author URI: https://woocommerce.com/ | |
| * Developer: Manos Psychogyiopoulos | |
| * |
| #!/bin/sh | |
| ############ | |
| # The following script is to help automate deployment of hugo sites on github pages. | |
| # If you're just getting started, I recommend reading my full notes here: | |
| # https://www.romandesign.co/setting-up-a-hugo-static-site-on-github/ | |
| # | |
| # To run it, make sure you have made some site updates to deploy and via terminal in your backend and save the code in your hugo backend repo. | |
| # Then type the following (no $): | |
| # |
| // Removing plugin controls from admin | |
| function remove_plugin_controls($actions, $plugin_file, $plugin_data, $context){ | |
| if (array_key_exists('edit', $actions)) { | |
| unset($actions['edit']); | |
| } | |
| if (array_key_exists('deactivate', $actions)) { |
| #!/bin/bash | |
| ## | |
| # Script to run WP All Import scripts sychronously with cron | |
| ## | |
| # This is default wp core directory for us | |
| ABSPATH="/var/www/project/wp" | |
| function usage() | |
| { |
| #!/bin/bash | |
| # webiste info | |
| WP_TITLE=${WP_SITENAME//\"/} | |
| WP_HOME=$WP_HOME | |
| WP_USER=$WP_ADMIN_NAME | |
| WP_PASSWORD=$WP_ADMIN_PASS | |
| WP_EMAIL=$WP_ADMIN_EMAIL | |
| # install |
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.
| # map of content type -> expires header | |
| map $sent_http_content_type $expires { | |
| default off; | |
| text/html epoch; | |
| text/css max; | |
| application/javascript max; | |
| ~image/ max; | |
| } | |
| # listen for BS traffic on 80 that lacks a hostname, and just serve |
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_ROOT=$1 # <-- wordpress root directory | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.