Tags » Perl

reStructuredText notes (.rst file extension)

Thanks to Eric Grange who asked Which lightweight markup language? I learned about reStructuredText (no cap R!) from a few comments Joseph Mitzen made.

It looks like reStructuredText has been around for much longer than… 1,253 more words

Development

How to install OWASP Joomscan vulnerability scanner @Windows

To use Joomscan.pl, a PERL interpreter is needed to be installed in Windows.
http://www.activestate.com/activeperl/downloads
After installation there should be an ENV variable to be available through CLI, so now open CMD (Windows+R) as an Administrator(!), and type: 28 more words

ITsec

Common between two files

  • Two files having 1 column in each file, want to extract common between two file.
#### Using Perl one liner
$ cat file_1 
ENSG00000260035
ENSG00000259932
ENSG00000233421
ENSG00000261441
ENSG00000178977
ENSG00000173250
ENSG00000263826
ENSG00000088986
ENSG00000088286
ENSG00000088934

$ cat file_2
ENSG00000260035
ENSG00000233421
ENSG00000178977
ENSG00000263826
ENSG00000088986
ENSG00000088286
ENSG00000012345
ENSG00000098765
ENSG00000045677
ENSG00000002340

$ perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' file_1 file_2
ENSG00000260035
ENSG00000233421
ENSG00000178977
ENSG00000263826
ENSG00000088986
ENSG00000088286

### Using AWK command
$ awk 'NR==FNR{arr[$0];next} $0 in arr' file_1 file_2
ENSG00000260035
ENSG00000233421
ENSG00000178977
ENSG00000263826
ENSG00000088986
ENSG00000088286
Perl

Perl %

#!/usr/local/bin/perl -w
print “Type a sentence of mix cases to find the words starting with Upper Case:\n”;
while ($inputline = <STDIN>)
{
while ($inputline =~ /\b\S+/g) … 97 more words

Parallel Processing with Catmandu

In this blog post I’ll show a technique to scale out your data processing with Catmandu. All catmandu scripts use a single process, in a single thread. 1,005 more words

Catmandu

I seem to never forget the ones who disappear

Awkward bun in my flax hair

sad tears; Tear, tear, tear

I seem to be able to be disjointed

Here, here, here

With so many people mixing in the place it’s hard to imagine your alone… 104 more words

Poems

Darning

Knit, perl,
It takes patience,
Mindfulness,
Focus,
Forgetting the million other things
Racing through
Your brain. 121 more words

Poetry