Snip2Code is shutting down.
It has been quite a ride, since 2013 when we launched our first prototype: thanks to the effort of you guys we collected more than 3 million snippets!
We are very proud to help all our users to be more efficient in their jobs, and to be the central point to share programming knowledge for everyone.
Our basic service is free, so we always survived on our own resources to give you Snip2Code.
Unfortunately, we are no more in the financial position to sustain this effort, and therefore we are announcing here our permanent shut down,
which will take place on August 1st, 2020.
Please save your private snippets using our backup function in the settings, here.
IF YOU WANT TO SAVE SNIP2CODE, PLEASE CONSIDER DOING A DONATION!
This will allow us to pay for the servers and the infrastructure. If you want to donate, Contact Us!
working on it ...

Filters

Explore InChannel Snippets

Sort by

Found 500 snippets

    public by thomesdas  85  0  2  0

    credit card bank transfer wester union transfer

    ++--  About us --++
    GMAIL:- thomasdas2080@gmail.com
    ICQ:- 753700440
    FOLLOWING HACKER SERVICES. 
    THIS ALL SERVICES IS FOR LIMIT COUNTRYS 
    COUNTRY BINS:- USA CA AU OMAN QATAR EU 
    TIME WESTER PLESES STAY AWAY 
    ONLY CONTCAT US INTERSED PEOPLES 
    HACKED CREDIT CARD DONT HAVE REFUND POLICY.
      
      
    CVV FILLS DEBIT CARD DATING LOGS 
      
    HACKED CREDIT CARD FULLZ 45$ PER-ONE
    DEBIT CARD   15$ PER-ONE
    PAYPAL LOGS SMALL BALANCE UPTO 3K :- 50$  
    3 YEARS PAID DATING LOGS  :- 40$ PER-ONE
      
    WESTER UNION TRANSFER 
      
    WU TRANSFER  MINIMUM TRANSFER 2000$  TARSNFER FEES 300$
    WU TRANSFER  TRANSFER 3000$$         TARSNFER FEES 350$ 
    WU TRANSFER  MAXIMUM TRANSFER 4000$$ TARSNFER FEES 400$ 
      
      
    BANMK WIRE TRANSFER 
    Bank USA & UK : ( LLOYDS TSB,BARCLAYS,Standard Chartered,HSBC...)
      
    BANK TRANSFER MINIMUM TRANSFER 5,000$ TARSNFER FEES 350$
    BANK TRANSFER AMOUNT  TRANSFER 1,000$ TARSNFER FEES 550$
    BANK TRANSFER AMOUNT TRANSFER 15,000$ TARSNFER FEES 650$
    BANK TRANSFER  MAXIMUM TRANSFER 20,000$ TARSNFER FEES 750$ 
      
    VIP-72 LONG-LASTING 1 YEAR  35$
    CREDIT CARD FULLZ SCAM PAGE 50$
    BLOCKCHAIN SCAM PAGE  50$
    OFFICE-365 SCAM PAGE  50$
    WESTER UNION BUG     400$
    PRIVET US RDP  36$
    CHASH BANK BRUTER  120$
    SEND-BLUSTER LIFE TIME KEY 50$
      
      
    ++--  About us --++
    GMAIL:- thomasdas2080@gmail.com
    ICQ:- 753700440				
    

    public by EmilVenter  64  1  2  0

    Snipper

    // Enter here the actual content of the snippet.						

    public by enayu  137  2  3  0

    [Comedy] The Whistlers (2020) Free Online

    https://www.dailymotion.com/playlist/x6qxmv
    // Enter here the actual content of the snippet.						
    https://www.dailymotion.com/playlist/x6qxmv
    https://www.dailymotion.com/playlist/x6qxmv
    https://www.dailymotion.com/playlist/x6qxmv
    

    public by Black637219369743230007  206  1  3  0

    google easter eggs

    so ya today what i will be showing you guys is not exactly a hack
    google easter eggs are cool little tricks that the developers made
    i will be showing you some of my faverite easter eggs
    if you search pheobe buffay a guitar will be on the right side press it
    if you search joey tribbiani a pizza will appear on the side press it 
    if you search chandler bing a armchair will appear press it
    or you can search wizard of oz a pair of red shoes will apear press it 
    i have a lot more but i am going to put it in my next snippet

    public by Black637219369743230007  145  0  3  0

    dino game

    so if any of you know of the dino game you can play when you have no internet on chrome
    i will be giving you some codes you can enter to hack the game 
    first right click and go to console
    here you can enter one or many of the following codes:
    after you think you have written the code you have to press enter/return for it to work
    this code makes you inmortal:Runner.prototype.gameOver = function(){}
    or if you want super speed you can write:Runner.instance_.setSpeed(1000)
    this code sets your current points:Runner.instance_.distanceRan = 12345 / Runner.instance_.distanceMeter.config.COEFFICIENT
    if you want to set your jump hight write:Runner.instance_.tRex.setJumpVelocity(120)

    public by Black637219369743230007  152  0  3  0

    hacking typing club

    so to hack edclub or typing club to get more stars all you have to do is:
    first you right click on the stars and go to elements
    now go to where it says something like stars stars=
    hear it shows the numbers of stars you have right click on the number of stars
    and press edit atribute,change the number of stars to the number you want
    warning!! you can not write a number more than 5

    public by gwarah  412  2  5  0

    Echo text padded

    This shell function outputs a text "padded" with a char. The user can choose the length and the padding char at the calling of function. How to install: 1. Put the script in a directory. Ex. /path/to/script 2. Load the function by an script or shell profile. Ex: . /path/to/script/lux_echopad.sh 3. Call the function Syntax : lxf_echo
    #!/bin/bash
    # File       : lux_echopad.sh
    # Goal       : echo a text "padded" with a sequence of chars
    # Requisites :
    #     1. SHELL=bash
    # Syntax     : lxf_echopad [-l <line_length>] [-c <char>]
    # History    :
    #   #version;date;description
    #   0.1.1b; 18/02/2020; second beta
    #   0.1.0b; 18/02/2020; first beta
    #   0.0.1dr; 03/02/2020; first draft
    #
    
    #
    # use these snippet to modify the datemask and tags default
    #
    # export LXV_ECHOPAD_LENGTH=60
    # export LXV_ECHOPAD_PADCHAR='-'
    #
    
    function lxf_echopad {
        #
        # default values: line length and padding char 
        #
        local p_linelength=${LXV_ECHOPAD_LENGTH:=60}
        local p_padchar=${LXV_ECHOPAD_PADCHAR:='-'}
        local p_text=""
        
        # others vars
        local v_aux
        local vt_pad
        local v_mod
        local v2_pad
        
        #
        # getopts 
        #
        local OPTIND=1
        local list_opt=""
        local opt_found=0
        while getopts ":l:c:" 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
                echo "Not allowed more than one parameter -${pkey} " ; exit 1
            fi
        
            # atualiza controle de chaves executadas
            (( opt_found++ ))
            list_opt="${list_opt};${pkey}"
        
            case $pkey in
            c)  # padding char
                v_aux="${OPTARG}"
                if [ ${#v_aux} -ne 1 ]; then
                    echo "char parameter invalid: ${v_aux}" ; exit 1
                fi
                p_padchar="${v_aux}"
                ;;
            l)  # line length
                v_aux="${OPTARG}"
                if ! [[ ${v_aux} =~ ^[0-9]+$ ]]; then    
                    echo "length parameter must be a integer: ${v_aux}" ; exit 1
                fi
                
                if [ ${v_aux} -lt 9 ]; then
                    echo "length parameter must be greater than 10: ${v_aux}" ; exit 1
                fi
                p_linelength=${v_aux}
                ;;
            \?)
                echo "Opção inválida -${OPTARG}"; exit 1
                ;;
            esac
        done
        
        # shift positional parameters
        [ $OPTIND -gt 1 ] && shift `expr $OPTIND - 1`
        p_text=$1
        
        if [ ${#p_text} -ge ${p_linelength} ]; then
            echo "${p_text}"
        else
            let vt_pad=${p_linelength}-${#p_text}
            let v_mod=${vt_pad}%2
            let v2_pad=${vt_pad}/2
            
            # left pad
            let v_aux=$v2_pad+$v_mod
            v_stl=`for k in $(seq 1 $v_aux);do printf ${p_padchar};done`
            
            # right pad
            let v_aux=$v2_pad
            v_str=`for k in $(seq 1 $v_aux);do printf ${p_padchar};done`
            
            echo "${v_stl}${p_text}${v_str}"
        fi
    }
    
    
    #
    # tests without exported variables
    #
    lxf_echopad " first "
    lxf_echopad -l 40 " second "
    lxf_echopad -c '=' -l 50 " third "
    lxf_echopad " first again "
    
    #
    # tests with exported variables
    #
    export LXV_ECHOPAD_LENGTH=65
    export LXV_ECHOPAD_PADCHAR='x'
    
    lxf_echopad " first "
    lxf_echopad -l 40 " second "
    lxf_echopad -c '=' -l 50 " third "
    lxf_echopad " first again "												

    public by gwarah  266  4  5  0

    Echo with system date

    This shell function outputs a text having before the system date and (optionally) a tag. see the examples in test section. The user can choose the date format and the tag at the calling of function. How to install: 1. Put the script in a directory. Ex. /path/to/script 2. Load the function by an script or shell profile. Ex: . /path/to/sc
    #!/bin/bash
    # File       : lux_echodate.sh
    # Goal       : echo <date>;[<tags>;]<text>
    # Requisites :
    #     1. SHELL=bash
    # Syntax     : lxf_echodate [-m <datemask>] [-t <tag>] text
    # History    :
    #   #version;date;description
    #   0.1.1b; 02/03/2020; code improved
    #   0.1.0b; 27/02/2020; first beta
    #   0.0.1dr; 18/02/2020; first draft
    #
    
    #
    # use these snippet to modify the datemask and tags default
    #
    # export LXV_ECHODATE_MASK='%d/%m/%Y %H:%M:%S'
    # export LXV_ECHODATE_TAG='ALERT'
    #
    function lxf_echodate {
        #
        # default values: datemask and tag
        #
        local p_datemask=${LXV_ECHODATE_MASK:='%d/%m/%Y %H:%M:%S'}
        local p_tag=${LXV_ECHODATE_TAG:=""}
            
        # others vars
        local v_aux
            
        #
        # getopts 
        #
        local OPTIND=1
        local list_opt=""
        local opt_found=0
        while getopts ":m:t:" 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
                echo "Not allowed more than one parameter -${pkey} " ; exit 1
            fi
        
            # atualiza controle de chaves executadas
            (( opt_found++ ))
            list_opt="${list_opt};${pkey}"
        
            case $pkey in
            m)  # datemask
                v_aux="${OPTARG}"
                if [ ${#v_aux} -eq 0 -o "${v_aux:0:1}" = "-" ]; then
                    echo "datemask cannot be empty" ; exit 1
                fi
                p_datemask="${v_aux}"
                
                # update the mask default
                # LXV_ECHODATE_MASK="${p_datemask}"
                ;;
            t)  # tag
                v_aux="${OPTARG}"
                if [ ${#v_aux} -eq 0 -o "${v_aux:0:1}" = "-" ]; then
                    echo "tag cannot be empty" ; exit 1
                fi
                p_tag="${v_aux}"
                
                # update the tag default
                # LXV_ECHODATE_TAG="${p_tag}"
                ;;
            \?)
                echo "Opção inválida -${OPTARG}"; exit 1
                ;;
            esac
        done
        
        # shift positional parameters
        [ $OPTIND -gt 1 ] && shift `expr $OPTIND - 1`
        p_text="$@"
        
        # echo
        echo "$(date "+${p_datemask}")${p_tag:+;${p_tag}};${p_text}"
    }
    																		

    public by gwarah  265  3  7  0

    Validação de CPF/CNPJ em HTML

    Este snippet é usado para teste de outro snippet que contém as classes javascript Cpf e Cnpj. Busque por "Validação de CPF/CNPJ em javascript" no meu canal.
    <html>
    <head>
    	<title>validação de CPFs/CNPJ</title>
    </head>
    <body>
        <!-- included this snippet -->
        <script src="cnpj_cpf.js"></script>
    <script type="text/javascript">
    
        function WinLoad() {
            document.getElementById("bt_cpf").addEventListener("click", validar_cpf, false);
            document.getElementById("bt_cnpj").addEventListener("click", validar_cnpj, false);
        }
        
        window.onload = WinLoad;
        
        // validação de CPF
        function validar_cpf() {
            let p_cpf=document.getElementById("txt_cpf").value;
            let v_cpf=new Cpf(p_cpf);
            // alert("cheguei aqui" + p_cpf);
            v_cpf.validar();
            document.getElementById("div_resultado_cpf").innerHTML = v_cpf.show_status();
            return true;
        }
        
        // validação de CNPJ
        function validar_cnpj() {
            let p_cnpj=document.getElementById("txt_cnpj").value;
            let v_cnpj=new Cnpj(p_cnpj);
            // alert("cheguei aqui" + p_cnpj);
            v_cnpj.validar();
            document.getElementById("div_resultado_cnpj").innerHTML = v_cnpj.show_status();
            return true;
        }
    </script>
    
    <p>Validação do CPF/CNPJ</p>
    
    <p>
    CPF: 
    <input type="text" id="txt_cpf" value=""> 
    <input type="button" id="bt_cpf" value="Validar">
    </p><br>
    <div id="div_resultado_cpf">não validado</div>
    
    <p>
    CNPJ: 
    <input type="text" id="txt_cnpj" value=""> 
    <input type="button" id="bt_cnpj" value="Validar">
    </p><br>
    <div id="div_resultado_cnpj">não validado</div>
    
    </body>
    </html>
    																																																						

    public by gwarah  292  4  6  0

    Validação de CPF/CNPJ em javascript

    Classes em javascript para validação de números de CPFs e CNPJs. Requisitos: browser ou ferramenta deve suportar a ECMAScript® 2015 Language Specification Obs:Em outro snippet há o código HTML para testar estas classes
    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
     * Arquivo      : cnpj_cpf.js
     * Observações  :
     *   #version;date;description
     *   0.1.0;20/12/2019; versão beta1
     */
    
    /**
     * Class: Cpf
     * version: 0.1.0;18/12/2019
     */
     
    class Cpf {
        /* constructor */
        constructor(p_cpf) {
            
            // validações iniciais
            if ( typeof p_cpf !== 'string' ) {
                throw "Parâmetro p_cpf " + p_cpf + " deve ser do tipo string!";
            }
            
            // retira não numéricos
            p_cpf = p_cpf.replace(/\D/g,'');
                   
            /* attributes */
            this._cpf = p_cpf;   // retira não numéricos
            this._er = /^[0-9]{11}$/;
            this._er_mask = /^[0-9]{3}\.?[0-9]{3}\.?[0-9]{3}\-?[0-9]{2}$/;
            this._status = 0;   // 0-não testado;1-válido;2-inválido
        }
    
    
        /* getters and setters */
        get cpf() {
            return this._cpf;
        }
        
        set cpf(p_cpf) {
            // validações iniciais
            if ( typeof p_cpf !== 'string' ) {
                throw "Parâmetro p_cpf " + p_cpf + " deve ser do tipo string!";
            }
            
            // retira não numéricos
            p_cpf = p_cpf.replace(/\D/g,'');   // retira não numéricos
            
            // atribuição
            this._cpf = p_cpf;
            this._status = 0;
        }
    
        get status() {
            return this._status;
        }
    
        /* others methods */
        validar() {
           this._status = ( this._validarCpf(this._cpf) ? 1 : 2);
           return ( this._status == 1 ) ? true : false;
        }
    
        show_status() {
            let str_out='CPF: ' + this._cpf + ' - status: ' + this._status;
            console.log(str_out);
            return str_out;
        }
    
        /* functions */
            
        //
        // validação de CPF
        //
        _validarCpf(p_cpf) {
    
            //
            // testes iniciais: descarta nulos, não strings e string que não é numérica de 11 dígitos
            //
    
            if ( typeof p_cpf !== 'string' ) { return false; }
    
            if ( ! ( this._er.test(p_cpf)) ) { return false; }
    
            //
            //  regra de validação do CPF
            //
    
            // quebra o CPF em 2 partes
            let cpf9digs=p_cpf.substring(0,9);
            let cpf2digs=p_cpf.substring(9,11);
    
            let soma=0;
            let digv="";
            let digv1=0;
            let digv2=0;
            let p=0;
            let dig=0;
            let mod11soma=0;
    
            // obtenção do primeiro dígito
            for(p=10;p>=2;p--) {
                dig=parseInt(cpf9digs.charAt(10-p));
                soma+=p*dig;
            }
            mod11soma = soma % 11;
            digv1=(mod11soma<2) ? 0 : (11-mod11soma);
    
            // obtenção do segundo dígito
            let cpf10digs= "" + cpf9digs + digv1;
            soma=0;
            digv2=0;
            for(p=11;p>=2;p--) {
                dig=parseInt(cpf10digs.charAt(11-p));
                soma+=p*dig;
            }
            mod11soma = soma % 11;
            digv2 = (mod11soma<2) ? 0 : (11-mod11soma);
    
            // dígito verificador completo
            digv= "" + digv1 + digv2;
    
            return (( digv === cpf2digs ) ? true : false);
        }
    }
    
    /**
    * Class: Cnpj
    * version: 0.1.0;18/12/2019
    */
    class Cnpj {
    
        /* getters and setters */
        constructor(p_cnpj) {
            
            // validações iniciais
            if ( typeof p_cnpj !== 'string' ) {
                throw "Parâmetro p_cnpj " + p_cnpj + " deve ser do tipo string!";
            }
            
            // retira não numéricos
            p_cnpj = p_cnpj.replace(/\D/g,'');
    
            /* attributes */
            this._cnpj = p_cnpj;
            this._er = /^[0-9]{14}$/;
            this._er_mask = /^[0-9]{2}\.?[0-9]{3}\.?[0-9]{3}\/?[0-9]{4}\-?[0-9]{2}$/;
            this._status = 0;   // 0-não testado;1-válido;2-inválido
        }
    
        /* getters and setters */
        get cnpj() {
            return this._cnpj;
        }
    
        set cnpj(p_cnpj) {
            // validações iniciais
            if ( typeof p_cnpj !== 'string' ) {
                throw "Parâmetro p_cnpj " + p_cnpj + " deve ser do tipo string!";
            }
            
            // retira não numéricos
            p_cnpj = p_cnpj.replace(/\D/g,'');
            this._cnpj = p_cnpj;
        }
    
        /* others methods */
        get status() {
            return this._status;
        }
    
        /* others methods */
        validar() {
           this._status = ( this._validarCnpj(this._cnpj) ? 1 : 2);
           return ( this._status == 1 ) ? true : false;
        }
    
        show_status() {
            let str_out='CNPJ: ' + this._cnpj + ' - status: ' + this._status;
            console.log(str_out);
            return str_out;
        }
    
        /* functions */
            
        //
        // validação de CPF
        //
        _validarCnpj(p_cnpj) {
            //
            // testes iniciais: descarta nulos, não strings e string que não é numérica de 11 dígitos
            //
            
            if ( typeof p_cnpj !== "string" ) { return false; }
        
            let ereg = new RegExp('^\\d{14}$');
            if ( ! ( ereg.test(p_cnpj)) ) { return false; }
        
            //
            //  regra de validação do CNPJ
            //
            
            // quebra o CPF em 2 partes
            let cnpj12digs=p_cnpj.substring(0,12);
            let cnpj2digs=p_cnpj.substring(12,14);
            
            let soma=0;
            let digv1=0;
            let digv2=0;
            let dig=0;
            let p=0,i=0;
            let digv="";
            let mod11soma=0;     
        
            //
            // regra de validação do CNPJ
            //
            
            // obtenção do primeiro dígito
            soma=0;
            digv1=0;
            p=2; // peso inicial
            for(i=12;i>=1;i--) {
                dig = parseInt(cnpj12digs.charAt(i-1));
                soma += p * dig;
                p= (p==9) ? 2 : (p+1);
            }
            mod11soma = soma%11;
            digv1= (mod11soma<2) ? 0 : (11-mod11soma);
        
            // obtenção do segundo dígito
            let cnpj13digs="" + cnpj12digs + digv1;
            soma=0;
            digv2=0;
            p=2; // peso inicial
            for(i=13;i>=1;i--) {
                dig=parseInt(cnpj13digs.charAt(i-1));
                soma += p * dig;
                p=(p==9) ? 2 : (p+1);
            }
            mod11soma=soma%11;
            digv2=(mod11soma<2)?0:(11-mod11soma);
            
            // dígito verificador completo
            digv="" + digv1 + digv2;
            
            return (( digv == cnpj2digs ) ? true : false);
        }
    }
    
    																																																
    • Public Snippets
    • Channels Snippets