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
var React = require('react'); // include library |
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
# rm -rf ~/.npm | |
# npm cache clear |
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
# Check out a Git branch, tag it with archive/, remove | |
# the remote branch, and get ready to do it all over again. | |
# | |
# USAGE: | |
# archive-branch feature/my-branch | |
function archive-branch() { | |
if [[ "$1" == "master" ]]; then | |
echo "I'm sorry, $USER. I'm afraid I can't do that. (Cannot archive master branch)" | |
return | |
fi |
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
$wp_request_headers = array( | |
'Authorization' => 'Basic ' . base64_encode( 'username:password' ) | |
); | |
$wp_request_url = 'http://localserver/wordpress-api/wp-json/wp/v2/posts/52'; | |
$wp_delete_post_response = wp_remote_request( | |
$wp_request_url, | |
array( | |
'method' => 'DELETE', |
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
// Create feature branch | |
git checkout -b feature/tiny-change | |
echo 'Hello world' > foo.txt // make whatever changes | |
git add . | |
git commit -m "Add great text file" | |
git push origin feature/tiny-change | |
// Happy with changes, merge to develop |
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 | |
/** | |
* | |
* Plugin Name: Demo - MJ WP-CLI Command | |
* Description: Create WP CLI Command | |
* Author: MJ | |
* Version: 1.0 | |
*/ |
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
@mixin full-width($bgcolor: #fff) { | |
position: relative; | |
&:before, &:after { | |
content: ""; | |
position: absolute; | |
background: $bgcolor; | |
top: 0; | |
bottom: 0; | |
width: 9999px; | |
} |