Skip to content

Instantly share code, notes, and snippets.

View jreisinger's full-sized avatar
👋
hello friend

Jozef Reisinger jreisinger

👋
hello friend
View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use v5.10; # to have say
# Get five random dates in the format MM-DD-YYYY
my @dates;
my $n = 0;
while ( $n++ <= 4 ) {
#<<<
http://www.mp3.sk/drziak-do-auta-tab-2-pre-samsung-galaxy-tab-3-p-236447.html
http://www.mp3.sk/drziak-s-uchytenim-na-celne-sklo-a-hlavovu-oprieku-pre-samsung-galaxy-tab-3-p-236674.html
http://www.tabletstore.sk/doplnky-do-auta/samsung-drziak-do-auta-na-tablety-7--az-8-2-/
@jreisinger
jreisinger / var-vs-arg.pl
Last active September 30, 2015 04:38
Global variable vs. function with argumet
#
# 1. global variable
#
my $num = 2;
exp();
sub exp {
return $num * $num;
}
"" filetype
filetype plugin on
set ofu=syntaxcomplete#Complete " omni completion
syntax enable
"" indenting
set tabstop=2
set shiftwidth=2
"set expandtab " spaces instead of tab
set autoindent
"" statusline
@jreisinger
jreisinger / gist:2152894
Created March 21, 2012 21:14
return list
def sum(a, b):
sum = a + b
return("the sum is", sum)
@jreisinger
jreisinger / mygrep.pl
Created October 20, 2012 17:11
mygrep
#!/usr/bin/perl
# Leave out comments and highlight regex
# Usage: $ mygrep [regex] <file>
# to compress blank lines: $ mygrep [regex] <file> | perl -00pe0
use strict;
use warnings;
use Term::ANSIColor;
my $regex = shift unless -f $ARGV[0];
@jreisinger
jreisinger / sort.pl
Created March 2, 2013 13:55
Change mtime of files so they sort on TV
#!/usr/bin/perl
# Change mtime of files so they sort on TV.
use strict;
use warnings;
use 5.010;
use File::Find;
die "Usage: $0 <dir(s)>\n" unless @ARGV;
my @files;
@jreisinger
jreisinger / orsr.pl
Created March 21, 2013 12:22
DON'T EDIT/REMOVE - referred to in http://perlmonks.org/?node_id=1024748
#!/usr/bin/perl
# Which companies are the names associated with?
use strict;
use warnings;
use HTML::LinkExtor;
use LWP::Simple;
use URI::Encode qw(uri_encode);
my $names_file = shift;