Per @samali0996 's comment below: https://gist.github.com/pjobson/6b9fb926c59f58aa73d4efa10fe13654?permalink_comment_id=4487157#gistcomment-4487157
The new WSL Win10/11 should support this natevly. Thanks for posting the update!
Per @samali0996 's comment below: https://gist.github.com/pjobson/6b9fb926c59f58aa73d4efa10fe13654?permalink_comment_id=4487157#gistcomment-4487157
The new WSL Win10/11 should support this natevly. Thanks for posting the update!
// Below: Autogenerated types from Quicktype. They have been modified by hand. | |
// ACF fields in standard endpoints do not exist out of the box, you have to add them yourself. | |
// k1sul1/k1kit does that for you automagically. | |
// To parse this data: | |
// | |
// import { Convert, RawStoneData, Texts, Taxonomies, PostTypes, PostStatuses } from "./file"; | |
// | |
// const taxonomies = Convert.toTaxonomies(json); | |
// const tags = Convert.toTags(json); |
const rewire = require('rewire'); | |
const defaults = rewire('react-scripts/scripts/build.js'); | |
let config = defaults.__get__('config'); | |
config.optimization.splitChunks = { | |
cacheGroups: { | |
default: false, | |
}, | |
}; |
Builds your theme, installs composer dependencies and deploys it to production / staging.
Create .circleci
folder in project root, and add config.yml
in it. Edit the config a bit. Use search & replace to substitute $PROD_SSH_PORT
to the SSH port number and $THEMENAME
to the folder name of your theme.
Login to CircleCI and add a project using the menu in the sidebar. Click "Set Up Project" on the project you want to setup CI for.
Brought to you by Headjack
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.
Let's start with some basics:
ffmpeg
calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe fileSome of my terminal preferences to make it look roughly like here: https://twitter.com/mieky/status/817453249632632833
Some other things I can heartily recommend:
{ | |
"_type": "export", | |
"__export_format": 2, | |
"__export_date": "2016-11-03T03:57:14.655Z", | |
"__export_source": "insomnia.desktop.app:v3.6.6", | |
"resources": [ | |
{ | |
"modified": 1477842143375, | |
"created": 1477841988306, | |
"parentId": null, |
/** | |
* Show draft and private pages in hierarchicial Parent pages dropdown. | |
* will work for any hier. post type. | |
*/ | |
function filter_attributes_dropdown_pages_args($dropdown_args) { | |
$dropdown_args['post_status'] = array('publish','draft', 'private'); | |
return $dropdown_args; | |
} | |
add_filter('page_attributes_dropdown_pages_args', __NAMESPACE__ . '\\filter_attributes_dropdown_pages_args', 100, 1); |
Adding @k1sul1's suggestion from the comments as it's more concise than what I had before:
I just wanted them all gone, so I ran this in the MySQL shell.
UPDATE wp_posts SET post_content = REGEXP_REPLACE(post_content, "\\[\/?vc(.*?)\]", "");
Note the double backslash. If you forget it, you'll replace all v's and c's with nothing, and the shortcodes will still be there. This works for other shortcode as well, just replace vc.
<?php | |
/** | |
* Sanitize accents from Cyrillic, German, French, Polish, Spanish, Hungarian, Czech, Greek, Swedish | |
* This replaces all accents from your uploads by renaming files and replacing attachment urls from database. | |
* This even removes NFD characters from OS-X by using Normalizer::normalize() | |
* This is one time script which you can use by running it with wp-cli: | |
* $ wp eval-file remove-accents-uploaded-files-and-database.php | |
*/ | |
// Get all uploads |