echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
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
/** | |
* Does not filter related products by tag | |
*/ | |
add_filter( 'woocommerce_product_related_posts_relate_by_tag', '__return_false' ); | |
/** | |
* Does not filter related products by category | |
*/ | |
add_filter( 'woocommerce_product_related_posts_relate_by_category', '__return_false' ); |
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
<?php | |
// Converts a number into a short version, eg: 1000 -> 1k | |
// Based on: http://stackoverflow.com/a/4371114 | |
function number_format_short( $n, $precision = 1 ) { | |
if ($n < 900) { | |
// 0 - 900 | |
$n_format = number_format($n, $precision); | |
$suffix = ''; | |
} else if ($n < 900000) { |
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
/** | |
* Register term fields | |
*/ | |
add_action( 'init', 'register_vendor_custom_fields' ); | |
function register_vendor_custom_fields() { | |
add_action( WC_PRODUCT_VENDORS_TAXONOMY . '_add_form_fields', 'add_vendor_custom_fields' ); | |
add_action( WC_PRODUCT_VENDORS_TAXONOMY . '_edit_form_fields', 'edit_vendor_custom_fields', 10 ); | |
add_action( 'edited_' . WC_PRODUCT_VENDORS_TAXONOMY, 'save_vendor_custom_fields' ); | |
add_action( 'created_' . WC_PRODUCT_VENDORS_TAXONOMY, 'save_vendor_custom_fields' ); | |
} |
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
add_action( 'wcpv_shortcode_registration_form_validation', 'wc_custom_vendors_validation', 10, 2 ); | |
function wc_custom_vendors_validation( $errors, $form_items ) { | |
if ( empty( $form_items['vendor_description'] ) ) { | |
$errors[] = __( 'Vendor Description is a required field.', 'woocommerce-product-vendors' ); | |
} | |
return $errors; | |
} |
If you're trying to do this, you came to the right place!
Watch this code work in real time: https://twitter.com/CodingDoug/status/940022568089554944
See also this gist for copying in the other direction: https://gist.github.com/CodingDoug/44ad12f4836e79ca9fa11ba5af6955f7
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
// get time stamp of query run | |
function setTimeStamp(sheetName) { | |
SpreadsheetApp.getActive().getSheetByName(sheetName) | |
.getRange('C2').setValue(new Date()) | |
} | |
// gaGet data | |
function gaGet(tableId, metrics, options) { | |
// Apply standard options | |
options = options || {}; |
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
df_gold=df[(df['Medal']=='Gold') & (df['Sport']=='Gymnastics')] | |
#change this by your sheet ID | |
SAMPLE_SPREADSHEET_ID_input = '1cvZswLiDo3LfhnA7RcS8vFqacx73RGor-OZ_FtvyLE8' | |
#change the range if needed | |
SAMPLE_RANGE_NAME = 'A1:AA1000' | |
def Create_Service(client_secret_file, api_service_name, api_version, *scopes): | |
global service |
OlderNewer