working on it ...

Filters

Explore InChannel Snippets

Sort by

Found 500 snippets

    public by Magesolution modified Friday at 2:09:12 AM  11  0  3  0

    Improve search quality & Speed up your store with Elastic Search Magento 2

    Searching a product in the Magento store can be a big pain for the customers specially when products are listed in a huge amount, this is a reason that most of the customers quit their online shopping. Hence, if you can help your customer search product fast also means you get more chances to gain customers’ sympathy. Thus, Elastic Search Magento 2
    https://www.magesolution.com/instant-search.html				

    public by gwarah modified Oct 15, 2018  35  0  3  0

    Create a symbolic link with a file dialog

    This script provides an easy way to create a link using zenity file dialog. requisites: It won't run ok if there would be any restriction related creating symlink command (ln -s ...) or if zenity package wouldn't be installed in your system. The syntax is very simple: crsln.sh [-f|-d] [/path/to/file_or_directory [/path/to/link_name]] [
    #/bin/bash
    # program     : crsln.sh
    # description : create a symlink with zenity file dialog
    # author      : lp (Luís Pessoa)
    # version     : 0.1.0b
    # syntax      : 
    # 	  crsln.sh [-f|-d] [/path/to/file_or_directory] [/path/to/link_name]] 
    # dependences : 
    #   1) shell: bash  
    #   2) package: zenity
    #   3) see restrictions to crete a symlink, man ln
    # history     :
    #   lp; 09/02/2018; first release
    #   lp; 12/12/2017; begin of development
    
    
    # syntax get_file
    function syntax {
        local SINTAX=""
        SINTAX=$1
        SINTAX+="\n syntax: get_file [-t <title>] [ -f <file_or_dir_selected> ] [-l <filters>]"
        SYNTAX+="\n for <filters> rules see: zenity --help-file-selection"
        
        echo -e "Error: ${SINTAX} \n" >&2
        return 1
    }
    
    # syntax script
    function syntax_main {
        local SINTAX=""
        SINTAX=$1
        SINTAX+="\n syntax: create_symlink.sh [-d|-f] [file_or_directory [link_name]]"
        SYNTAX+="\n for <filters> rules see: zenity --help-file-selection"
        
        echo -e "Error: ${SINTAX} \n" >&2
        return 1
    }
    
    # catch a directory or file
    function dir_or_file {
        local opc
        local pkey=""
        RETORNO=0
        
        # 0: zenity; 1: dialog; 2: shell
        local dialog_type=${DIALOG_TYPE}
    
        if [ $dialog_type -eq 0 ]; then
            opc=$(zenity --list  \
                --text "Target is file or directory?" \
                --radiolist  --column "Check" --column "Options" \
                TRUE "file" FALSE "directory" --separator=" ")
            case $? in
            1)
                    echo "Opção deve ser selecionada" >&2
                    return 1
                    ;;
            -1)
                    echo "Ocorreu um erro na seleção de opções"
                    return 1
                    ;;
            esac
        else
            syntax "dialog type not implemented yet."
            return 1
        fi
        
        echo "${opc}"
        return $RETORNO
    }
    
    # catch a directory or file
    function get_file {
        local opt_found=0
        local list_opt=""
        local pkey=""
        
        local fun_text="Choose a file"
        local fun_filename=""
        local fun_filters=""
        local fun_result=""
        
        # 0: zenity; 1: dialog; 2: shell
        local dialog_type=${DIALOG_TYPE}
        local zenity_keys="--file-selection"
        
        # flags
        local flag_dir=0
        
        OPTIND=1
        while getopts ":t:l:f:ds" pkey; do
    
            # verifica se chave já foi chamada
            # excluir chaves que foram chamadas mais de uma vez
            echo "${list_opt}" | grep -q $pkey
            if [ $? -eq 0 ]; then
                syntax "Option -$pkey called twice or more times."
                return 1
            fi
    
            # stored invoked keys
            (( opt_found++ ))
            list_opt="${list_opt};${pkey}"
    
            if [ $opt_found -gt 5 ]; then
                syntax "too many keys"
                return 1
            fi
    
            case "${pkey}" in
                t)
                    fun_text="${OPTARG}"
                    ;;
                f)
                    fun_filename="${OPTARG}"
                    ;;
                l)
                    fun_filters="${OPTARG}"
                    ;;
                d)
                    [ -z "${fun_text}" ] && fun_text="Choose a directory"
                    zenity_keys+=" --directory"
                    flag_dir=1
                    ;;
                s)
                    zenity_keys+=" --save "    
                    ;;    
                \?)
                    syntax "inavalid option: -$OPTARG"
                    return 1
                    ;;
                :)
                    syntax "Option -$OPTARG require argument."
                    return 1
                    ;;
            esac
        done
            
        # zenity_keys+=" --title=\"${fun_text}\" "
        
        if [ -s "${fun_filters}" ]; then
            zenity_keys+=" --file_filter=${fun_filters} "
        fi
        
        if [ -s "${fun_filename}" ]; then
            zenity_keys+=" --filename=${fun_filename} "
        fi
        
        # dialog tool
        if [ $dialog_type -eq 0 ]; then
            fun_result=`zenity --title="${fun_text}" ${zenity_keys}`
            case $? in
            1)
                    echo "No one option selected" >&2
                    return 1
                    ;;
            -1)
                    echo "Error!"
                    return 1
                    ;;
            esac
        else
            syntax "dialog type not implemented."
        fi
        
        echo "${fun_result}"
        return 0
    }
    
    export FILEMAP=""
    export DIRLINK=""
    export LINKNAME=""
    export FLAGTYPE=0
    export TYPEMAP="file"
    export CUR_DIR=`pwd`
    export RETORNO=0
    
    # 
    OPTIND=1
    opt_found=0
    while getopts ":df" pkey; do
        # stored invoked keys
        (( opt_found++ ))
    
        if [ $opt_found -gt 1 ]; then
            syntax_main "too many keys"
            exit 1
        fi
    
        case "${pkey}" in
        d)
             FLAGTYPE=1
             TYPEMAP="directory"
             ;;
        f)
             FLAGTYPE=1
             TYPEMAP="file"
             ;;
        \?)
             syntax_main "invalid key: -$pkey"
             exit 1
             ;;
        esac
    done
    
    # due -d|-f key
    [ $FLAGTYPE -eq 1 ] && shift
    
    # don't change this value!!
    # 0: zenity; 1: dialog; 2: shell
    export DIALOG_TYPE=0
    
    #
    # parameters validation
    #
    [ $# -gt 2 ] && syntax_main "Too many parameters: $#"
    
    # getting file or directory to link
    if [ $# -eq 0 ]; then
        [ $FLAGTYPE -eq 0 ] && TYPEMAP=`dir_or_file` 
        if [ "${TYPEMAP}" = "file" ]; then
            FILEMAP=`get_file -t "Choose any file to link"`
        else
            FILEMAP=`get_file -d -t "Choose any directory to link"`
        fi
    else
        FILEMAP="$1"
    fi 
    
    
    if [ -d "${FILEMAP}" ]; then 
        if [ "${TYPEMAP}" = "file" ]; then
           syntax_main "key set to -f can't link direcory ${FILEMAP}"
        fi
    elif [ -f "${FILEMAP}" ]; then 
        if [ "${TYPEMAP}" = "directory" ]; then
            syntax_main "key set to -d can't link file ${FILEMAP}"
        fi
    else
        syntax_main "Not found or not type regular file or directory: ${FILEMAP}"
        exit 1
    fi
    
    # getting linkname
    if [ $# -lt 2 ]; then
        LINKNAME=`get_file -s -t "Choose the linkname"`
    else
        LINKNAME="${2}"
    fi
    
    # check if ${LINKNAME} already exists file
    if [ -e ${LINKNAME} ]; then  
        if [ -L ${LINKNAME} ]; then
            zenity --question --text="Link ${LINKNAME} already exist. Overwrite it?" --ok-label="Yes" --cancel-label="No"
            if [ $? -ne 0 ]; then
                exit 1 
            fi
        else
            zenity --error --title "error" --text="${LINKNAME} already exist as file or directory"
            exit 1 
        fi    
    fi
    # link
    echo ""
    echo "---------------"
    echo "${TYPEMAP} : ${FILEMAP} "
    echo "link : ${LINKNAME} "
    
    echo ""
    echo "Press a key to continue or [ctrl]+c to exit " ; read
    ln -s -r "${FILEMAP}" "${LINKNAME}"
    [ $? -gt 0 ] && echo "failure!" && exit 1
    
    echo "sucess!"
    exit $RETORNO
    																		

    public by Beauke modified Oct 15, 2018  26  0  2  0

    pak mij

    import java.util.Scanner;
    
    /*
     * To change this license header, choose License Headers in Project Properties.
     * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */
    
    /**
     *
     * @author beaur
     */
    public class oef2deelbaar {
    
        /**
         * @param args the command line arguments
         */
        public static void main(String[] args) {
            // TODO code application logic here
            
            
            int x = 1;
            int aEven=0;
            int aDeelbaar3=0;
    
           
             Scanner scan = new Scanner(System.in);
             int getal;
            while(x <= 5)
            {
                System.out.printf("geef getal:  %d %n", x);
                getal = scan.nextInt();
               
                if( getal%2 ==0)
                {
                    aEven++;
                 
                }
                else if(getal%3==0)
                {
                    aDeelbaar3++;
                }
                 x++;
            }
               System.out.printf("aanrtaleven getal = %d aantaldellbaardoor3 %d %n",aEven,aDeelbaar3);
        }
            
        }

    public by waaren modified Oct 14, 2018  33  1  3  1

    function seconds2Clock

    input seconds. return formatted string (day,hours,minutes,seconds)
    function seconds2Clock(seconds)
      local days = math.floor(seconds / 86400)
      seconds = seconds - days * 86400
      local hours = math.floor(seconds / 3600 )
      seconds = seconds - hours * 3600
      local minutes = math.floor(seconds / 60) 
      seconds = seconds - minutes * 60
      
      return string.format("%d days, %d hours, %d minutes, %d seconds.",days,hours,minutes,seconds)
    end 						

    public by LoydBanks modified Oct 12, 2018  42  0  2  0

    100% BANK TRANSFER WIRE LOGINS WU TRANSFER BUG

    PAYPAL TRANSFER CC CVV FULLZ SHIP SHOP ADMINISTRATION
    
    I am a verified carder, I have hack and spam Bank account with good AZZA capacity. I have secured varieties of spam tools available on my sec-index and this includes ID's, Passport, DOB, BINS, CC Cvv Fullz, WesternUnion transfer Bug, Hack PayPal account, MSR, dumps+pin track1&2, warez, with proofs of transactions and accounts. 
     
    *When you contact me I need your trust , I only work with reliable buyers. I have hack and spam to get license routine number from a well balance account running variety of transfer cashing out with zero theft and no traces or future charge back fee securing a long term business partner having your order protected down to my breath.
    
    
    Contact me:
    
    
     ICQ : 744 820 260
    
    
    Email: loydblankenship@yahoo.com
    
    Gmail : Loydb73@gmail.com
    
    
    Phone : +1 (832) 356-8819
    
    More services information and photos of software at:
    
    https://quicktransfers.ru
    
    
    _________i Exchange WU to BTC WU to WMZ_________
    
    
    - 100$ WU = 110$ BTC
    - 200$ WU = 230$ BTC
    - 100$ WU = 110$ WMZ 
    - 200$ WU = 230$ WMZ
    
    
    ************ Western Union transfers************ 
    
    
    I sure someone want transfer WU ... At the moment i have some software can transfer WU 100% best and sure .
    
    - Transfer > US,UK,CA,AU,EU,Asia,France,Germany,Italy and very easy to cash out African: 
    
    + My Price : 
    
    > WU Transfer 1500$ = 100$ min ! 
    
    > WU Transfer 3500$ = 250$ 
    
    > WU Transfer 6000$ = 400$ 
    
    > WU Transfer 8000$ = 550$ Maximum! 
    
    Price High because i hacke really here 
    
    15 minis have MTCN and done 
    Please don't ask me about transfer with small amout ... ALL must know transfer very hard so if u want let's pay for me with minimum
    With transfer Wu , all sender detail and mtcn i send u ... u can pick up at all Western office in 48 hours ... After 15-30 mins i receive
    money of u, i will send mtcn and sender details for u ... I hope all must read clear before contact me .. ok ?
    All info about transfer let's contact through 
    
    SOFTWARE WU KEY :
    
    
    _ WU - BUG 2013 : 200$
    _ WU - BUG (change data location and money use ): 800$
    _ WU - BUG V7.1 (NEW) : 700$
    _ WU - BUG 7.2 : 600$
    _ WU - BUG TRANSFER : 700$
    _ WU - SOFTWARE WITH BANK LOG IN AND Activation Code : 8000$
    
    __________ Bank Logins Prices US UK CA AU EU _____________
    
    
    . Bank Us : ( HALIFAX,BOA,CHASE,Wells Fargo...) 
    . Balance 5000$ = 200$ 
    . Balance 8000$ = 400$ 
    . Balance 12000$ = 600$ 
    . Balance 15000$ = 800$ 
    . Balance 20000$ = 1000$ 
    
    
    - Bank UK : ( LLOYDS TSB,BARCLAYS,Standard Chartered,HSBC...) 
    . Balance 5000 GBP = 300$ 
    . Balance 12000 GBP = 600$ 
    . Balance 10000 GBP = 700$ 
    . Balance 20000 GBP = 1000$ 
    . Balance 300000 GBP = 1200$ 
    
    _______________________________________________
    - Transferwill be sent via e-mail or when you want.
    
    - I accept PM (Perfect money), Bitcoin (BTC)or WU (western union) or MG (MoneyGram) 
    a
    Contact me :
    
    
    
     ICQ : 744 820 260
    
    
    Email: loydblankenship@yahoo.com
    
    Gmail : Loydb73@gmail.com
    
    
    Phone : +1 (832) 356-8819
    
    
    ****PROOF OF TRANSACTIONS****
    
    
    

    public by simonwalker modified Oct 10, 2018  48  0  3  0

    Magento 2 Gift Wrap Extension By FME

    Magento 2 Gift Wrap extension lets you offer gift wrapping on store products. Add an unlimited number of wrap designs and classify them into a variety of gift wrap types. Assign products to each design and add a price to charge for the wrapping service. You can also restrict gift wrap option to selected store views using magento 2 gift wrap. Person
    // Enter here the actual content of the snippet.						

    public by Magesolution modified Oct 9, 2018  50  0  3  0

    Free Magento Daily Deal Extension

    Free Magento Daily Deal Extension is a useful tool to help you create and manage multiple deals simply and convenientlyis. You can setup countdown timer for daily deals, weekly deal or for any time period you want with this Magento Deals Extension. You are able to adjust the amount of product to sell during the promotion campaign. Deal accompanied
    https://www.magesolution.com/magento-daily-deals.html				

    public by simonwalker modified Oct 4, 2018  95  0  3  0

    Magento 2 Request a Callback - Hide Price Extension By FME

    Magento 2 Request a CallBack extension allows you to hide product prices from selected user groups or store views. You can replace the price option with ‘Get a quote’ popup, an image, or an alternative page. Subsequently, you can hide other Calls-to-action like ‘Add to Cart’, ‘Add to Wishlist’, and ‘Add to compare.’ Set conditions to restrict the p
    // code here 

    public by Magesolution modified Oct 3, 2018  99  0  3  0

    Drag & Drop Magento 2  — A Great Extension for Enhanced Navigation

    Drag & Drop Magento 2 by Magesolution is a great extension for enhanced navigation lowing admin to offer a brief description of the site withintop navigation section. The extension is highly customizable, allowing store owners to improve the website navigation in a professional way as this makes it possible to organize your eCommerce website produc
    https://www.magesolution.com/mega-menu-magento-2.html
    

    public by Magesolution modified Oct 3, 2018  95  0  3  0

    Mega Menu Magento 2 — A Great Extension for Enhanced Navigation

    Mega Menu Magento 2 is a great extension for enhanced navigation lowing admin to offer a brief description of the site withintop navigation section. The extension is highly customizable, allowing store owners to improve the website navigation in a professional way as this makes it possible to organize your eCommerce website products in a profession
    https://www.magesolution.com/mega-menu-magento-2.html					
    • Public Snippets
    • Channels Snippets