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
docker run -it -v "$(pwd)"/whatever-path-has-script/:/name-for-docker-path python:latest python3 /name-for-docker-path/script.py |
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
#!/bin/bash | |
# Get Expiry dates for SSL Cert | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <servername>" | |
exit 1 | |
fi | |
sn=$1 |
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
#!/bin/bash | |
# weather--Gets the weather for a specific region or ZIP code. | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <zipcode>" | |
exit 1 | |
fi | |
apikey="[whatever your key is]" |
I hereby claim:
- I am zoracon on github.
- I am zoracon (https://keybase.io/zoracon) on keybase.
- I have a public key ASA9pI0yrtU4PTfcvE2RiKHnZqp1yvCXiSIJbcL_zPawLwo
To claim this, I am signing this object:
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
/** | |
* Creates Footer Menus for Footer Options in Theme Manager | |
* @subcommand create-footer-menus | |
*/ | |
function create_footer_menus() { | |
$site_name = get_bloginfo('name'); | |
$menu_name = 'footer-menu'; | |
WP_CLI::line('Parsing Footer Menus for: ' . $site_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
<?php | |
// Refactoring | |
//Repetitive code in several places, had to package it into a function | |
// 1. This was everywhere (about 5 files) | |
$post_category_ids = array(); | |
$post_terms = get_the_terms(get_the_ID(), 'category'); | |
if ($post_terms && !is_wp_error($post_terms)) { | |
foreach ($post_terms as $post_term) { |
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 | |
function function_that_params_get_accepted(param_1, param_2) { | |
//code goes here; | |
} | |
//Define the Action | |
add_filter('function_hook_name', 'function_that_params_get_accepted', 10 , 2); // 10 == priority & 2 = # of params needed (defined from above) | |
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 | |
list($var_1,$var_2,$var_3,$var_4,$var_5) = explode(",", $var_array['5-Vars'])); | |
?> |
NewerOlder