Skip to content

Instantly share code, notes, and snippets.

@tacitochaves
tacitochaves / gist:8239381
Created January 3, 2014 15:09
União entre dois arrays
#!/home/chaves/perl5/perlbrew/perls/perl-5.16.3/bin/perl
use 5.12.0;
my @A = (1, 2, 3, 5, 7, 23, 8, 14, 95, 19);
my @B = (3, 14, 6, 22, 88, 19, 100);
my @AUB = sort { $a <=> $b } map { $_ } (@A,@B);
@tacitochaves
tacitochaves / gist:8250368
Created January 4, 2014 01:41
array of array
#!/home/chaves/perl5/perlbrew/perls/perl-5.16.3/bin/perl
use 5.12.0;
my @AoB = (
[ 'a1', 'b1', 'c1' ],
[ 'a2', 'b2', 'c2' ],
);
@tacitochaves
tacitochaves / gist:9414791
Last active August 29, 2015 13:57
Atividade 9 com socket
#!/usr/bin/perl
use IO::Socket::INET;
use strict;
my $server_socket = IO::Socket::INET->new(
'LocalAddr' => '0.0.0.0',
'LocalPort' => '8086',
'Proto' => 'tcp',
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Acesso ao Sistema</title>
</head>
<style>
body {
background-color: #11a6d4;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Acesso ao Sistema</title>
</head>
<style>
body {
background-color: #11a6d4;
}
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use DBI;
my $cgi = new CGI;
Author: Tácito Chaves
Created: 05/13/2014
Description: This is a simple vim configuration file .vimrc
nmap <C-f> :%!perltidy -q<CR>
nnoremap <C-f> :%!perltidy -q<CR>
vnoremap <C-f> :!perltidy -q<CR>
#!/usr/bin/env perl
use 5.014;
say "####################################";
say "Program of sum and difference.";
say "####################################";
say "Entre com a opção desejada.";
say "1 - For sum";
@tacitochaves
tacitochaves / check_port_open.pl
Created May 23, 2014 17:00
Check port open with IP
#!/usr/bin/env perl
use 5.12.0;
print "**********************************\n";
print "* PORT SCAN - São Luís TECNOLOGY *\n";
print "**********************************\n";
print "\n Digite o IP Alvo........:";
chomp(my $ip=<STDIN>);
print " Digite a Porta Inicial..:";
@tacitochaves
tacitochaves / nsupdate.sh
Last active August 29, 2015 14:02
nsupdate.sh
#!/bin/bash
#
# nsupdate.sh
#
# Script para inserir endereços dinâmicos no servidor de DNS.
# variáveis de ambiente
KEYNAME="server"
HASH="J+fO2y2XYAVhlBSExwF7Bz/07fMd849Cnq3C+8QhuVr+C5imEig9qBUv8HBFHqccXIJ3GFJXRZnkX/0XCkzBng=="