add_action ( 'init', function(){
$menu_locations = [
'off_canvas' => __( 'Off Canvas' )
];
register_nav_menus( $menu_locations );
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 collection = new wp.api.collections.Posts(); | |
collection.fetch().done(function(response) { | |
console.log(response); | |
console.log('| ID | Author | Date | Title |'); | |
console.log('|-------|--------|---------------------|--------|'); | |
for ( var i = 0; i < response.length; i++) { |
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
grep -R -E "(?:woo_options\['(.*)'\])" ./ --include='*.php' -ohw |
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
########################### | |
# NGROK DOCS: | |
# https://ngrok.com/docs | |
########################### | |
cd ~/ | |
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip | |
unzip ngrok-stable-linux-arm.zip | |
sudo mv ngrok /usr/local/bin/ | |
ngrok http 80 |
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
### | |
# References https://craigiswayne.wordpress.com/2018/01/20/my-media-centre/ | |
### | |
#### | |
# Variables | |
#### | |
PI_IP=192.168.8.112; | |
PI_USERNAME=osmc; |
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
URL=www.google.com | |
curl -sILk $URL; |
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
/** | |
* Debugging window.open function | |
* Overwrites the origin window.open function so that you can see the call stack | |
* And debug variables | |
* @see https://www.w3schools.com/Jsref/met_win_open.asp | |
*/ | |
window.open = function( URL, name, specs, replace ){ | |
console.group("Debugging the window.open function"); | |
console.log("URL : " + URL); | |
console.log("name : " + name); |
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
# Find all do_action's and add_action's | |
grep -En "(add|do)_action\(" . -R --context=2 --include="*.php" | |
# Find all apply_filter's and add_filter's | |
grep -En "(apply|add)_filters?\(" . -R --context=2 --include="*.php" |