- Install required npm packages
socket.io-client laravel-echo - Registering these two package to src/main.js file
import Echo from 'laravel-echo'
window.io = require('socket.io-client')
| <?php | |
| $type = 'custom_post_type'; | |
| $args = array( | |
| 'post_type' => $type, | |
| 'post_status' => 'publish', | |
| 'posts_per_page' => -1, | |
| 'ignore_sticky_posts'=> true | |
| ); | |
| $my_query = null; | |
| $my_query = new WP_Query($args); |
| // Hook in | |
| add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
| // Our hooked in function - $fields is passed via the filter! | |
| function custom_override_checkout_fields( $fields ) { | |
| $fields['shipping']['shipping_phone'] = array( | |
| 'label' => __('Phone', 'woocommerce'), | |
| 'placeholder' => _x('Phone', 'placeholder', 'woocommerce'), | |
| 'required' => false, | |
| 'class' => array('form-row-wide'), |
| #!/bin/bash | |
| #============================================================================== | |
| #TITLE: mysql_backup.sh | |
| #DESCRIPTION: script for automating the daily mysql backups on development computer | |
| #AUTHOR: tleish | |
| #DATE: 2013-12-20 | |
| #VERSION: 0.4 | |
| #USAGE: ./mysql_backup.sh | |
| #CRON: | |
| # example cron for daily db backup @ 9:15 am |
| $type = $request->input('email_or_phone'); | |
| $user = UserVerify::where('user_id', $request->input('user_id')) | |
| ->where(function($query) use ($type, $request) { | |
| if ($type == 1) { | |
| return $query->where('email', $request->input('email')); | |
| } | |
| if ($type == 2) { | |
| return $query->where('mobile_no', $request->input('mobile_no')); | |
| } |
| ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4 |