Skip to content

Instantly share code, notes, and snippets.

View saiftynet's full-sized avatar

Saif Ahmed saiftynet

  • Maidstone, Kent
View GitHub Profile
@saiftynet
saiftynet / cal.pl
Last active May 11, 2024 12:06
Perl CLI Calendar using DateTime
#!/usr/bin/env perl
#### Pure Perl implementation of a terminal calendar app ###
# #
# * by default produce a monthly calendar for current month #
# * if passed a number less than 12 produces a calendar for #
# that month in current year #
# * if passed two numbers and first is less than 12 then prints #
# corresponding month in that year #
# * if passed number greater than 12 prints the calendar for #
@saiftynet
saiftynet / shit
Created May 1, 2020 10:42 — forked from certik/shit
#!/usr/bin/perl
no warnings 'utf8';
use strict;
use Image::Magick;
use Term::Size;
use Getopt::Long;
use Time::HiRes qw(gettimeofday tv_interval);
our ($cachehit,$cachemiss,$nocache,$filter);
@saiftynet
saiftynet / noconfig.pl
Last active March 7, 2020 22:02
self modifying perl code
#!/usr/env perl
use strict;use warnings;
my %config;
loadConfig(); ##load config from __DATA__
foreach (sort keys %config){
print $_, " => ",$config{$_},"\n__\n";# display config
print "Enter new Value for $_\n>>"; # offer to modify it
chomp( $config{$_}=<>); # modify it
}
saveConfig(); #save new config