- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or foldersinany application - Add a
Run Shell Scriptaction- your default shell should already be selected, otherwise use
/bin/zshfor macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
This file contains hidden or 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
| const defaultConfig = require( './node_modules/@wordpress/scripts/config/webpack.config.js' ); | |
| const path = require( 'path' ); | |
| const postcssPresetEnv = require( 'postcss-preset-env' ); | |
| const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' ); | |
| const IgnoreEmitPlugin = require( 'ignore-emit-webpack-plugin' ); | |
| const production = process.env.NODE_ENV === ''; | |
| module.exports = { | |
| ...defaultConfig, |
for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.
- open
Terminal, go to the dir :cd /Applications/Beyond Compare.app/Contents/MacOS - change the name
BComparetoBCompare.bak:mv BCompare BCompare.bak - touch a file name
BCompare, andchmod a+ux BCompare:touch BCompare && chmod a+ux BCompare - open
BComparewith text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
This file contains hidden or 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
| **/*.min.js | |
| **/*.build.js | |
| **/node_modules/** | |
| **/vendor/** | |
| build | |
| coverage | |
| cypress | |
| node_modules | |
| vendor |
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
- Make sure your
Local by FlyWheelWordPress install is a custom install
Using the REST API to upload a file to WordPress is
quite simple. All you need is to send the file in a
POST-Request to the wp/v2/media route.
There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:
This file contains hidden or 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
| fetch(ajax_url, { | |
| method: 'POST', | |
| credentials: 'same-origin', | |
| headers: new Headers({'Content-Type': 'application/x-www-form-urlencoded'}), | |
| body: 'action=zget_profile_user' | |
| }) | |
| .then((resp) => resp.json()) | |
| .then(function(data) { | |
| if(data.status == "success"){ | |
| _this.setState({loaded:true,user:data.user}); |
This file contains hidden or 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
| // Sticky Nav Component | |
| var Sticky = (function() { | |
| 'use strict'; | |
| var CSS_CLASS_ACTIVE = 'is-fixed'; | |
| var Sticky = { | |
| element: null, | |
| position: 0, | |
| addEvents: function() { |
This file contains hidden or 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
| function custom_query_shortcode($atts) { | |
| // EXAMPLE USAGE: | |
| // [loop the_query="showposts=100&post_type=page&post_parent=453"] | |
| // Defaults | |
| extract(shortcode_atts(array( | |
| "the_query" => '' | |
| ), $atts)); |
This file contains hidden or 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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
NewerOlder