Skip to content

Instantly share code, notes, and snippets.

View juliaamosova's full-sized avatar
🏠
Working from home

Julia Amosova juliaamosova

🏠
Working from home
View GitHub Profile
@juliaamosova
juliaamosova / reverse-order-array.js
Created September 25, 2017 03:06
Hackerrank: Print each array element in reverse order
function main() {
var n = parseInt(readLine());
arr = readLine().split(' ');
arr = arr.map(Number);
console.log(arr.reverse().join(' '));
}
@juliaamosova
juliaamosova / julia-feedr-app.js
Created August 19, 2017 04:52
Feedr Project App
$(document).ready(function(){
// Array to store all feed sources
var SOURCES = [
{
displayName: "Reddit",
url: "https://www.reddit.com/r/worldnews/top/.json",
proxyRequired: false,
defaultSource: false, // You can have only one default source
formatResponse: function(response) {
@juliaamosova
juliaamosova / Display shipping cost next to the Flat Rate which is set to be Free
Created May 26, 2017 02:35
Display shipping cost next to the Flat Rate which is set to be Free
/**
* Open `\wp-content\plugins\woocommerce\includes\wc-cart-functions.php`
* Search for `wc_cart_totals_shipping_method_label function`
* Replace it with the following function
**/
function wc_cart_totals_shipping_method_label( $method ) {
$label = $method->get_label();
if ( $method->cost >= 0 ) {
@juliaamosova
juliaamosova / Display a short description of Mix & Match Product contents
Created May 25, 2017 02:59
Display a short description of Mix & Match Product contents
/** Add the following line to the 'wc-mnm-template-hooks.php' file */
add_action( 'woocommerce_mnm_row_item_description', 'woocommerce_template_mnm_product_description' );
***********************************
/** Add the following function to the 'wc-mnm-template-functions.php' file */
if ( ! function_exists( 'woocommerce_template_mnm_product_description' ) ) {