Skip to content

Instantly share code, notes, and snippets.


  • MadeiraMadeira
  • Brazil
Block or report user

Report or block rickslayer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View eloquent_tips_laravel.php
--Simple Where
Model::where('field', '*operator', 'value').
//*operator = "< , >, =, =>, =< etc"
-- Between where
Model::whereBetween('field',['value1', 'value2']);
-- Raw Where for exclusive treatments
Model::whereRaw('LEFT(field, 4) = tesssttteeee')
rickslayer / rck_send_param_and_files.html
Created Apr 5, 2019
Send parameteres and Files together Ajax - Enviar parametros e arquivos juntos em requisição
View rck_send_param_and_files.html
<input type="file" id="files">
$("#files").on('change', function(event)
form = new FormData();
form.append('anotherparam', "teste");
rickslayer / rck_Ship_to_a_different_address_wc.php
Created Mar 2, 2019
Retirar o checkbox marcado como padrão endereço de cobrança no Checkout Woocommerce
View rck_Ship_to_a_different_address_wc.php
add_filter( 'woocommerce_ship_to_different_address_checked', '__return_true' );
rickslayer / rck_style_woocommerce.css
Last active Sep 15, 2018
Oculta campos país, estado e cidade no calculo de frete no carrinho do Woocommerce
View rck_style_woocommerce.css
/* força mostrar o formulário de cálculo de frete no carrinho */
display:block !important;
/*Oculta os campos de país, estado e cidade*/
display: none !important;
View rck_input_number_with_maxlength.html
<p>Number Input</p>
<input type="number" id="el_number" min="1" max="99" maxlength="2" />
width : 200px;
height: 30px;
let numb = document.getElementById("el_number");
View rck_angular_shortcuts_tips.txt
//Run server
ng serve
//Create project
ng new nameproject
//Create new component
ng generate component namecomponent
short version: ng g c namecomponent
rickslayer / rck_add_element_before_cart_button_wc.php
Created Sep 12, 2018
Add any HTML element before cart button on product page
View rck_add_element_before_cart_button_wc.php
//adiciona botão na página do produto
//add button before cart button on product page
function botao_medida()
echo 'any HTML element';
add_action('woocommerce_before_add_to_cart_button', 'botao_medida', 11);
rickslayer / rck_show_newest_reviews_product_on_top_wc.php
Created Sep 12, 2018
Show newest product reviews on top Woocommerce Product page
View rck_show_newest_reviews_product_on_top_wc.php
// show newest product reviews on top Woocommerce Product page
add_filter( 'woocommerce_product_review_list_args', 'newest_reviews_first' );
function newest_reviews_first($args) {
$args['reverse_top_level'] = true;
return $args;
rickslayer / rck_remove_password_strength_wc.php
Created Sep 12, 2018
Remove strength password register user woocommerce
View rck_remove_password_strength_wc.php
// Remove strength password register woocommerce
function fa_remove_password_strength() {
wp_dequeue_script( 'wc-password-strength-meter' );
wp_deregister_script( 'wc-password-strength-meter' );
add_action( 'wp_enqueue_scripts', 'fa_remove_password_strength', 99999 );
rickslayer / rck_remove_tabs_product_wc.php
Created Sep 12, 2018
Remove tabs on products woocommerce page
View rck_remove_tabs_product_wc.php
// Remove the additional information tab
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['additional_information'] );
return $tabs;
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
You can’t perform that action at this time.