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
#!/bin/sh | |
set -e | |
vendor/bin/phpunit | |
(git push) || true | |
git checkout production | |
git merge master |
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 a stylesheet after default style.css | |
wp_enqueue_style( 'my-css', get_template_directory_uri() . 'my-css.css', array('themename-style')); | |
//WooCommerce - Sort products by SKU | |
add_filter('woocommerce_get_catalog_ordering_args', 'custom_woocommerce_catalog_orderby'); | |
function custom_woocommerce_catalog_orderby( $args ) { | |
$args['meta_key'] = '_sku'; | |
$args['orderby'] = 'meta_value'; | |
$args['order'] = 'asc'; | |
return $args; |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php | |
/** | |
* Manage WooCommerce styles and scripts. | |
*/ | |
function grd_woocommerce_script_cleaner() { | |
// Remove the generator tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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 | |
// File: app/Http/Controllers/CreateProductController.php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Webkul\Attribute\Models\Attribute; | |
use Webkul\Attribute\Models\AttributeOption; | |
use Webkul\Attribute\Repositories\AttributeFamilyRepository; | |
use Webkul\Product\Repositories\ProductRepository; |
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 | |
$query = Model::findAll(); | |
var_dump($query->createCommand()->rawSql); exit; |
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
var dateNow = new Date(); | |
Vue.component('counter', { | |
template: '<div>' | |
+ '<template v-if="date > now">' | |
+ '<div><span>{{ d }}</span><br>dias</div> : ' | |
+ '<div><span>{{ h }}</span><br>horas</div> : ' | |
+ '<div><span>{{ m }}</span><br>minutos</div> : ' | |
+ '<div><span>{{ s }}</span><br>segundos</div>' | |
+ '</template>' |
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 | |
$lat = Request::get('lat'); | |
$lng = Request::get('lng'); | |
$distancia = 10; // Distancia em kilometros | |
$places = DB::select("SELECT * , ( 3956 * ACOS( COS( RADIANS( {$lat} ) ) * COS( RADIANS( latitude ) ) * COS( RADIANS( longitude ) - RADIANS( {$lng} ) ) + SIN( RADIANS( {$lat} ) ) * SIN( RADIANS( latitude ) ) ) ) AS distance FROM places HAVING distance < {$distancia} ORDER BY distance LIMIT 0 , 300"); | |
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 | |
error_reporting(0); | |
class Calendar { | |
var $bgColor = "#FFFFFF"; | |
var $mouseOverColor = "#9999FF"; | |
var $lineColor = "#000000"; | |
var $fontColor = "#000000"; | |
var $eventBgColor = "#BBBBFF"; | |
var $eventStyle = ""; |
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
define( | |
[ | |
'jquery', | |
'Magento_Checkout/js/model/quote', | |
'Magento_Catalog/js/price-utils' | |
], | |
function ($,quote, priceUtils) { | |
"use strict"; | |
...... | |
formatedPrice = getFormattedPrice(price) |
NewerOlder