This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<otrs_test> | |
<Summary> | |
<Item Name="Database">MySQL 5.5.34</Item> | |
<Item Name="Host">yourhost.example.com</Item> | |
<Item Name="OS">Linux</Item> | |
<Item Name="Perl">5.14.2</Item> | |
<Item Name="Product">OTRS 3.3.1</Item> | |
<Item Name="TestNotOk">1</Item> | |
<Item Name="TestOk">16</Item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Rex; | |
use Rex::Commands::Cloud; | |
use IO::All; | |
use HTTP::Tiny; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -- | |
# Kernel/System/GenericAgent/ReopenOldTickets.pm - generic agent notifications | |
# Copyright (C) 2014 Perl-Services.de, http://perl-services.de | |
# -- | |
# This software comes with ABSOLUTELY NO WARRANTY. For details, see | |
# the enclosed file COPYING for license information (AGPL). If you | |
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt. | |
# -- | |
package Kernel::System::GenericAgent::ReopenOldTickets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for my $info ( $hostname, $kernel, $uptime, $ifconfig, $route, $memory, $disk ) { | |
print $file sprintf "%s\n%s\n", '=' x 70, $info; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT th.id, ticket_id AS searched_id | |
FROM ticket_history th | |
INNER JOIN ticket_state ts ON ts.id = th.state_id | |
INNER JOIN ticket_state_type tst ON tst.id = ts.type_id | |
WHERE tst.name IN('open', 'new', 'pending reminder', 'pending auto') | |
HAVING th.id = ( | |
SELECT MAX(id) | |
FROM ticket_history | |
WHERE create_time <= '2014-12-31 23:59:59' | |
AND ticket_id = searched_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use SOAP::Lite; | |
my $soap = SOAP::Lite | |
->uri( 'http://www.perl-services.de/TicketConnector' ) # namespace configured in webservice (transport protocol) | |
->proxy('http://localhost/otrs/nph-genericinterface.pl/Webservice/Extern' ) # <HTTP_type>://<domain>/<script_path>/nph-genericinterface.pl/Webservice/<NameOfWebservice> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT t.customer_id, t.title, ta.time_unit, dfv.value_text FROM time_accounting ta INNER JOIN ticket t ON t.id = ta.ticket_id LEFT OUTER JOIN dynamic_field_value dfv ON dfv.object_id = ta.article_id LEFT OUTER JOIN dynamic_field df ON dfv.field_id = df.id WHERE ta.create_time BETWEEN '2011-05-31 00:00:00' AND '2014-12-31 23:59:59'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reneeb@perl-services:~/community$ perl -E ' open $wfh, ">", "large_file.txt"; say $wfh $_ for 0 .. 1_000_000; close $wfh; open my $fh, "<","large_file.txt"; my $line; for ( ;<$fh>; ) { $line = $. } say $.; <STDIN>' | |
1000001 | |
=> 18083 reneeb 20 0 29924 3952 1972 S 0,0 0,1 0:00.50 perl | |
reneeb@perl-services:~/community$ perl -E ' open $wfh, ">", "large_file.txt"; say $wfh $_ for 0 .. 1_000_000; close $wfh; open my $fh, "<","large_file.txt"; my $line; for ( <$fh> ) { $line = $. } say $.; <STDIN>' | |
1000001 | |
=> 18101 reneeb 20 0 174m 148m 1988 S 0,0 1,9 0:00.70 perl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $seq = FastaSeq->new(id => 'A1'); | |
$seq->seq('atcg'); | |
#print Dumper $seq; | |
my $in = ReadFasta->new(infile => 't/test.fa'); | |
my $s = $in->next_seq(); | |
print ">", $s->id, " ", $s->descr, "\n"; | |
print $s->seq, "\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $in = ReadFasta->new(infile => 't/test.fa'); | |
my $s = $in->next_seq(); | |
print ">", $s->id, " ", $s->descr, "\n"; | |
print $s->seq, "\n"; | |
$in->next_line; | |
$s = $in->next_seq(); | |
print ">", $s->id, " ", $s->descr, "\n"; |