running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
/** | |
* Get All orders IDs for a given product ID. | |
* | |
* @param integer $product_id (required) | |
* @param array $order_status (optional) Default is 'wc-completed' | |
* | |
* @return array | |
*/ | |
function get_orders_ids_by_product_id( $product_id, $order_status = array( 'wc-completed' ) ){ | |
global $wpdb; |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.
Example:
# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
#!/usr/bin/env node | |
console.log('yay gist') |
import random | |
letters = (("ই", "ঈ"), ("দ",), (" ",), ("মো", "মু"), ("বা",), ("র", "রা", "রো"), ("ক",)) | |
greetings = "".join([letter_group[random.randrange(len(letter_group))] for letter_group in letters]) | |
print(greetings) |
$wp_customize->add_setting( 'themeslug_media_setting_id', array( | |
'sanitize_callback' => 'absint', | |
'validate_callback' => 'themeslug_validate_image, | |
) ); | |
$wp_customize->add_control( | |
new WP_Customize_Media_Control( $wp_customize, 'themeslug_media_setting_id', array( | |
'label' => __( 'Custom Core Media Setting' ), | |
'section' => 'custom_section', // Add a default or your own section | |
'mime_type' => 'image', |
#!/bin/sh | |
# Copyright (C) 2009-2017 Three Nine Consulting | |
# Always good practice to update packages. However ask user if they would like to do so | |
# For explanation on how this works and why check out https://garywoodfine.com/use-pbcopy-on-ubuntu/ | |
read -p "Do you want to update your package repositories before proceeding ? " -n 1 -r | |
echo #adding new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y | |
fi |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class GoogleDriveServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap the application services. |
If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:
echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes
I suggest you edit your /etc/rc.local
file to make this change persistant across reboots.
sudo nano /etc/rc.local
<?php | |
/** | |
* Create a metabox with a single field. | |
* Replace `_namespace` with some namespace for your project to avoid conflicts with other items | |
*/ | |
// | |
// Create Metabox | |
// |